Class: Jats::Text
Instance Attribute Summary
Attributes inherited from Node
#index, #xml
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 Method Details
#annotations ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/jats/text.rb', line 7
def annotations
xml.css('xref').collect do |ref|
Annotation.from_xml(ref).tap do |ann|
ann.source = self.id
end
end
end
|
#attributes ⇒ Object
15
16
17
|
# File 'lib/jats/text.rb', line 15
def attributes
{ content: content }
end
|
#content ⇒ Object
3
4
5
|
# File 'lib/jats/text.rb', line 3
def content
xml.text
end
|