Class: TableAnalysis::BodyTd
- Inherits:
-
Object
- Object
- TableAnalysis::BodyTd
- Defined in:
- lib/table_analysis/body.rb
Instance Attribute Summary collapse
-
#colspan ⇒ Object
Returns the value of attribute colspan.
-
#rowspan ⇒ Object
Returns the value of attribute rowspan.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rowspan, colspan) ⇒ BodyTd
constructor
A new instance of BodyTd.
- #reserved_seat? ⇒ Boolean
Constructor Details
#initialize(rowspan, colspan) ⇒ BodyTd
Returns a new instance of BodyTd.
5 6 7 8 9 |
# File 'lib/table_analysis/body.rb', line 5 def initialize(rowspan, colspan) @rowspan = rowspan.nil? ? 1 : rowspan.to_i @colspan = colspan.nil? ? 1 : colspan.to_i end |
Instance Attribute Details
#colspan ⇒ Object
Returns the value of attribute colspan.
3 4 5 |
# File 'lib/table_analysis/body.rb', line 3 def colspan @colspan end |
#rowspan ⇒ Object
Returns the value of attribute rowspan.
3 4 5 |
# File 'lib/table_analysis/body.rb', line 3 def rowspan @rowspan end |
Class Method Details
.config(rowspan, colspan) ⇒ Object
11 12 13 |
# File 'lib/table_analysis/body.rb', line 11 def self.config(rowspan, colspan) new(rowspan, colspan) end |
Instance Method Details
#reserved_seat? ⇒ Boolean
15 16 17 |
# File 'lib/table_analysis/body.rb', line 15 def reserved_seat? @colspan != 1 || @rowspan != 1 end |