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.7.6 lib/netsuite/support/attributes.rb
netsuite-0.7.5 lib/netsuite/support/attributes.rb
netsuite-0.7.4 lib/netsuite/support/attributes.rb
netsuite-0.7.3 lib/netsuite/support/attributes.rb
netsuite-0.7.2 lib/netsuite/support/attributes.rb
netsuite-0.7.1 lib/netsuite/support/attributes.rb
netsuite-0.7.0 lib/netsuite/support/attributes.rb
netsuite-0.6.9 lib/netsuite/support/attributes.rb
netsuite-0.6.8 lib/netsuite/support/attributes.rb
netsuite-0.6.7 lib/netsuite/support/attributes.rb
netsuite-0.6.6 lib/netsuite/support/attributes.rb
netsuite-0.6.5 lib/netsuite/support/attributes.rb
netsuite-0.6.4 lib/netsuite/support/attributes.rb
netsuite-0.6.3 lib/netsuite/support/attributes.rb
netsuite-0.6.2 lib/netsuite/support/attributes.rb
netsuite-0.6.1 lib/netsuite/support/attributes.rb
netsuite-0.6.0 lib/netsuite/support/attributes.rb
netsuite-0.5.9 lib/netsuite/support/attributes.rb
netsuite-0.5.8 lib/netsuite/support/attributes.rb
netsuite-0.5.7 lib/netsuite/support/attributes.rb