Sha256: 8cf167e9cd857b2ca9762401765398c5a971dad0c59d505fdd666c117f94de79

Contents?: true

Size: 462 Bytes

Versions: 107

Compression:

Stored size: 462 Bytes

Contents

module NetSuite
  module Support
    module Attributes

      def attributes
        @attributes ||= {}
      end

      def attributes=(attributes)
        @attributes = attributes
      end

      def initialize_from_attributes_hash(attributes = {})
        attributes.select { |k,v| self.class.fields.include?(k) }.each do |k,v|
          send("#{k}=", v)
        end
        self.klass = attributes[:class] if attributes[:class]
      end

    end
  end
end

Version data entries

107 entries across 107 versions & 1 rubygems

Version Path
netsuite-0.9.3 lib/netsuite/support/attributes.rb
netsuite-0.9.2 lib/netsuite/support/attributes.rb
netsuite-0.9.1 lib/netsuite/support/attributes.rb
netsuite-0.9.0 lib/netsuite/support/attributes.rb
netsuite-0.8.12 lib/netsuite/support/attributes.rb
netsuite-0.8.11 lib/netsuite/support/attributes.rb
netsuite-0.8.10 lib/netsuite/support/attributes.rb
netsuite-0.8.9 lib/netsuite/support/attributes.rb
netsuite-0.8.8 lib/netsuite/support/attributes.rb
netsuite-0.8.7 lib/netsuite/support/attributes.rb
netsuite-0.8.6 lib/netsuite/support/attributes.rb
netsuite-0.8.5 lib/netsuite/support/attributes.rb
netsuite-0.8.4 lib/netsuite/support/attributes.rb
netsuite-0.8.3 lib/netsuite/support/attributes.rb
netsuite-0.8.2 lib/netsuite/support/attributes.rb
netsuite-0.8.1 lib/netsuite/support/attributes.rb
netsuite-0.8.0 lib/netsuite/support/attributes.rb
netsuite-0.7.9 lib/netsuite/support/attributes.rb
netsuite-0.7.8 lib/netsuite/support/attributes.rb
netsuite-0.7.7 lib/netsuite/support/attributes.rb