Class: Elibri::ONIX::Release_3_0::Imprint
- Inherits:
-
Object
- Object
- Elibri::ONIX::Release_3_0::Imprint
- Includes:
- HashId
- Defined in:
- lib/elibri_onix/onix_3_0/imprint.rb
Constant Summary collapse
- ATTRIBUTES =
from ONIX documentation: A repeatable group of data elements which together identify an imprint or brand under which the product is marketed. The composite must carry either a name identifier or a name or both.
[ :name ]
- RELATIONS =
[]
Constants included from HashId
HashId::SKIPPED_2, HashId::SKIPPED_ATTRIBS
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#to_xml ⇒ Object
Returns the value of attribute to_xml.
Instance Method Summary collapse
-
#initialize(data) ⇒ Imprint
constructor
A new instance of Imprint.
Methods included from HashId
Constructor Details
#initialize(data) ⇒ Imprint
Returns a new instance of Imprint.
23 24 25 26 |
# File 'lib/elibri_onix/onix_3_0/imprint.rb', line 23 def initialize(data) @to_xml = data.to_s @name = data.at_xpath('xmlns:ImprintName').try(:text) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/elibri_onix/onix_3_0/imprint.rb', line 21 def name @name end |
#to_xml ⇒ Object
Returns the value of attribute to_xml.
21 22 23 |
# File 'lib/elibri_onix/onix_3_0/imprint.rb', line 21 def to_xml @to_xml end |