Class: Elibri::ONIX::Release_3_0::PublisherSubject

Inherits:
Object
  • Object
show all
Defined in:
lib/elibri_onix/onix_3_0/publisher_subject.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ PublisherSubject

Returns a new instance of PublisherSubject.



9
10
11
12
13
# File 'lib/elibri_onix/onix_3_0/publisher_subject.rb', line 9

def initialize(data)
  @to_xml = data.to_s
  @code = data.at_css('SubjectCode')&.text
  @heading_text = data.at_css('SubjectHeadingText')&.text
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



7
8
9
# File 'lib/elibri_onix/onix_3_0/publisher_subject.rb', line 7

def code
  @code
end

#heading_textObject

Returns the value of attribute heading_text.



7
8
9
# File 'lib/elibri_onix/onix_3_0/publisher_subject.rb', line 7

def heading_text
  @heading_text
end

#to_xmlObject

Returns the value of attribute to_xml.



7
8
9
# File 'lib/elibri_onix/onix_3_0/publisher_subject.rb', line 7

def to_xml
  @to_xml
end

Instance Method Details

#inspect_include_fieldsObject



15
16
17
# File 'lib/elibri_onix/onix_3_0/publisher_subject.rb', line 15

def inspect_include_fields
  [:code]
end