Sha256: 5ee9cb82b7f586ba0808a7098b6000fada69b98b79d7a54ccdc789e5ea786d7b

Contents?: true

Size: 315 Bytes

Versions: 6

Compression:

Stored size: 315 Bytes

Contents

module NetSuite
  module AttributeSupport

    def attributes
      @attributes ||= {}
    end
    private :attributes

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

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
netsuite-0.0.10 lib/netsuite/attribute_support.rb
netsuite-0.0.9 lib/netsuite/attribute_support.rb
netsuite-0.0.8 lib/netsuite/attribute_support.rb
netsuite-0.0.7 lib/netsuite/attribute_support.rb
netsuite-0.0.6 lib/netsuite/attribute_support.rb
netsuite-0.0.5 lib/netsuite/attribute_support.rb