Class: TableParser::TableColumn
- Defined in:
- lib/table_parser/table_column.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Attributes inherited from TableNode
#colspan, #element, #rowspan, #text
Instance Method Summary collapse
- #[](index) ⇒ Object
-
#initialize(element, rowspan = nil, colspan = nil) ⇒ TableColumn
constructor
A new instance of TableColumn.
- #size ⇒ Object
- #to_s ⇒ Object
Methods inherited from TableNode
Constructor Details
#initialize(element, rowspan = nil, colspan = nil) ⇒ TableColumn
Returns a new instance of TableColumn.
4 5 6 7 |
# File 'lib/table_parser/table_column.rb', line 4 def initialize(element, rowspan=nil, colspan=nil) super(element, rowspan, colspan) @children = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
3 4 5 |
# File 'lib/table_parser/table_column.rb', line 3 def children @children end |
Instance Method Details
#[](index) ⇒ Object
13 14 15 |
# File 'lib/table_parser/table_column.rb', line 13 def [](index) @children[index] end |
#size ⇒ Object
9 10 11 |
# File 'lib/table_parser/table_column.rb', line 9 def size @children.size end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/table_parser/table_column.rb', line 17 def to_s "TableColumn<name=#{text}, children=#{@children.collect{|c| c.to_s }.join(",")}>" end |