Class: Jats::Affiliation
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Node
#attributes, from_xml, index_for, #initialize, #name, reset_indices, #type
Constructor Details
This class inherits a constructor from Jats::Node
Instance Method Details
#to_hash ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/jats/affiliation.rb', line 3 def to_hash { label: xml.css('label').text, department: xml.css('institution').text.gsub(/^\W+|\W+$/, ''), address: xml.css('addr-line').text, country: xml.css('country').text } end |