Module: ONIX::ProductIdentifiers

Included in:
RelatedProduct, Set
Defined in:
lib/onix/product_identifiers.rb

Constant Summary collapse

ACCESSOR_METHODS =
{:proprietary_id => 1, :ean => 3, :isbn10 => 2, :isbn13 => 15, :isbn => 15, :lccn => 13}

Instance Method Summary collapse

Instance Method Details

#initialize_product_identifiers(options) ⇒ Object



7
8
9
10
11
12
# File 'lib/onix/product_identifiers.rb', line 7

def initialize_product_identifiers(options)
  @product_identifiers ||= []
  ACCESSOR_METHODS.keys.push(:product_identifiers).each do |name|
    self.send("#{name}=", options[name]) if options[name]
  end
end

#product_identifiersObject



23
24
25
# File 'lib/onix/product_identifiers.rb', line 23

def product_identifiers
  @product_identifiers ||= []
end