Class: Jats::Text

Inherits:
Node
  • Object
show all
Defined in:
lib/jats/text.rb

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

#annotationsObject



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

#attributesObject



15
16
17
# File 'lib/jats/text.rb', line 15

def attributes
  { content: content }
end

#contentObject



3
4
5
# File 'lib/jats/text.rb', line 3

def content
  xml.text
end