Class: PLOS::Affiliation
- Inherits:
-
Object
- Object
- PLOS::Affiliation
- Includes:
- XmlHelpers
- Defined in:
- lib/plos/affiliation.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#id ⇒ Object
Returns the value of attribute id.
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(node) ⇒ Affiliation
constructor
A new instance of Affiliation.
Methods included from XmlHelpers
#nodes_to_hash, #parse_node, #tag_value
Constructor Details
#initialize(node) ⇒ Affiliation
Returns a new instance of Affiliation.
9 10 11 12 13 |
# File 'lib/plos/affiliation.rb', line 9 def initialize(node) self.id = node.attr("id") self.label = tag_value(node, "label") self.address = tag_value(node, "addr-line") end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
7 8 9 |
# File 'lib/plos/affiliation.rb', line 7 def address @address end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/plos/affiliation.rb', line 5 def id @id end |
#label ⇒ Object
Returns the value of attribute label.
6 7 8 |
# File 'lib/plos/affiliation.rb', line 6 def label @label end |