Class: Elibri::ONIX::Release_3_0::PublisherSubject
- Inherits:
-
Object
- Object
- Elibri::ONIX::Release_3_0::PublisherSubject
- Includes:
- HashId
- Defined in:
- lib/elibri_onix/onix_3_0/publisher_subject.rb
Constant Summary collapse
- ATTRIBUTES =
[ :code, :heading_text ]
- RELATIONS =
[ :inspect_include_fields ]
Constants included from HashId
HashId::SKIPPED_2, HashId::SKIPPED_ATTRIBS
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#heading_text ⇒ Object
Returns the value of attribute heading_text.
-
#to_xml ⇒ Object
Returns the value of attribute to_xml.
Instance Method Summary collapse
-
#initialize(data) ⇒ PublisherSubject
constructor
A new instance of PublisherSubject.
- #inspect_include_fields ⇒ Object
Methods included from HashId
Constructor Details
#initialize(data) ⇒ PublisherSubject
20 21 22 23 24 |
# File 'lib/elibri_onix/onix_3_0/publisher_subject.rb', line 20 def initialize(data) @to_xml = data.to_s @code = data.at_css('SubjectCode').try(:text) @heading_text = data.at_css('SubjectHeadingText').try(:text) end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
18 19 20 |
# File 'lib/elibri_onix/onix_3_0/publisher_subject.rb', line 18 def code @code end |
#heading_text ⇒ Object
Returns the value of attribute heading_text.
18 19 20 |
# File 'lib/elibri_onix/onix_3_0/publisher_subject.rb', line 18 def heading_text @heading_text end |
#to_xml ⇒ Object
Returns the value of attribute to_xml.
18 19 20 |
# File 'lib/elibri_onix/onix_3_0/publisher_subject.rb', line 18 def to_xml @to_xml end |
Instance Method Details
#inspect_include_fields ⇒ Object
26 27 28 |
# File 'lib/elibri_onix/onix_3_0/publisher_subject.rb', line 26 def inspect_include_fields [:code] end |