Class: SimpleBioC::Relation
- Defined in:
- lib/simple_bioc/relation.rb
Instance Attribute Summary collapse
-
#nodes ⇒ Object
Returns the value of attribute nodes.
-
#original ⇒ Object
Returns the value of attribute original.
Attributes inherited from NodeBase
#document, #id, #infons, #passage, #sentence
Instance Method Summary collapse
- #adjust_ref ⇒ Object
-
#initialize(parent) ⇒ Relation
constructor
A new instance of Relation.
- #to_c ⇒ Object
Methods inherited from NodeBase
Constructor Details
#initialize(parent) ⇒ Relation
Returns a new instance of Relation.
6 7 8 9 |
# File 'lib/simple_bioc/relation.rb', line 6 def initialize(parent) super(parent) @nodes = [] end |
Instance Attribute Details
#nodes ⇒ Object
Returns the value of attribute nodes.
4 5 6 |
# File 'lib/simple_bioc/relation.rb', line 4 def nodes @nodes end |
#original ⇒ Object
Returns the value of attribute original.
4 5 6 |
# File 'lib/simple_bioc/relation.rb', line 4 def original @original end |
Instance Method Details
#adjust_ref ⇒ Object
11 12 13 |
# File 'lib/simple_bioc/relation.rb', line 11 def adjust_ref @nodes.each{|n| n.adjust_ref} end |
#to_c ⇒ Object
15 16 17 |
# File 'lib/simple_bioc/relation.rb', line 15 def to_c "Relation:#{id}" end |