Class: PLOS::Affiliation

Inherits:
Object
  • Object
show all
Includes:
XmlHelpers
Defined in:
lib/plos/affiliation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#addressObject

Returns the value of attribute address.



7
8
9
# File 'lib/plos/affiliation.rb', line 7

def address
  @address
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/plos/affiliation.rb', line 5

def id
  @id
end

#labelObject

Returns the value of attribute label.



6
7
8
# File 'lib/plos/affiliation.rb', line 6

def label
  @label
end