Class: Ovec::CombinedNode
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #<<(thing) ⇒ Object
- #[](index) ⇒ Object
-
#initialize(content = []) ⇒ CombinedNode
constructor
A new instance of CombinedNode.
- #length ⇒ Object
- #to_tex ⇒ Object
Constructor Details
#initialize(content = []) ⇒ CombinedNode
Returns a new instance of CombinedNode.
105 106 107 |
# File 'lib/ovec/nodes.rb', line 105 def initialize(content = []) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
125 126 127 |
# File 'lib/ovec/nodes.rb', line 125 def content @content end |
Instance Method Details
#<<(thing) ⇒ Object
109 110 111 |
# File 'lib/ovec/nodes.rb', line 109 def <<(thing) @content << thing end |
#[](index) ⇒ Object
121 122 123 |
# File 'lib/ovec/nodes.rb', line 121 def [](index) @content[index] end |
#length ⇒ Object
117 118 119 |
# File 'lib/ovec/nodes.rb', line 117 def length @content.length end |
#to_tex ⇒ Object
113 114 115 |
# File 'lib/ovec/nodes.rb', line 113 def to_tex() content.map(&:to_tex).join('') end |