Class: Elibri::ONIX::Release_3_0::SupplierIdentifier
- Inherits:
-
Object
- Object
- Elibri::ONIX::Release_3_0::SupplierIdentifier
- Includes:
- HashId
- Defined in:
- lib/elibri_onix/onix_3_0/supplier_identifier.rb
Constant Summary collapse
- ATTRIBUTES =
[ :type, :type_name, :value ]
- RELATIONS =
[]
Constants included from HashId
HashId::SKIPPED_2, HashId::SKIPPED_ATTRIBS
Instance Attribute Summary collapse
-
#to_xml ⇒ Object
Returns the value of attribute to_xml.
-
#type ⇒ Object
Returns the value of attribute type.
-
#type_name ⇒ Object
Returns the value of attribute type_name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(data) ⇒ SupplierIdentifier
constructor
A new instance of SupplierIdentifier.
Methods included from HashId
Constructor Details
#initialize(data) ⇒ SupplierIdentifier
Returns a new instance of SupplierIdentifier.
27 28 29 30 31 32 |
# File 'lib/elibri_onix/onix_3_0/supplier_identifier.rb', line 27 def initialize(data) @to_xml = data.to_s @type = data.at_xpath('xmlns:SupplierIDType').try(:text) @type_name = data.at_xpath('xmlns:IDTypeName').try(:text) @value = data.at_xpath('xmlns:IDValue').try(:text) end |
Instance Attribute Details
#to_xml ⇒ Object
Returns the value of attribute to_xml.
25 26 27 |
# File 'lib/elibri_onix/onix_3_0/supplier_identifier.rb', line 25 def to_xml @to_xml end |
#type ⇒ Object
Returns the value of attribute type.
25 26 27 |
# File 'lib/elibri_onix/onix_3_0/supplier_identifier.rb', line 25 def type @type end |
#type_name ⇒ Object
Returns the value of attribute type_name.
25 26 27 |
# File 'lib/elibri_onix/onix_3_0/supplier_identifier.rb', line 25 def type_name @type_name end |
#value ⇒ Object
Returns the value of attribute value.
25 26 27 |
# File 'lib/elibri_onix/onix_3_0/supplier_identifier.rb', line 25 def value @value end |