Class: Jats::Annotation
Instance Attribute Summary collapse
-
#source ⇒ Object
Returns the value of attribute source.
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Node
from_xml, index_for, #initialize, #name, reset_indices, #to_hash, #type
Constructor Details
This class inherits a constructor from Jats::Node
Instance Attribute Details
#source ⇒ Object
Returns the value of attribute source.
3 4 5 |
# File 'lib/jats/annotation.rb', line 3 def source @source end |
Instance Method Details
#attributes ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/jats/annotation.rb', line 5 def attributes rid = xml['rid'] id = rid.gsub('ref-', '') { source: source, content: xml.text, target: "article:bib#{id}" } end |