Class: TableAnalysis::BodyTd

Inherits:
Object
  • Object
show all
Defined in:
lib/table_analysis/body.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#colspanObject

Returns the value of attribute colspan.



3
4
5
# File 'lib/table_analysis/body.rb', line 3

def colspan
  @colspan
end

#rowspanObject

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

Returns:

  • (Boolean)


15
16
17
# File 'lib/table_analysis/body.rb', line 15

def reserved_seat?
  @colspan != 1 || @rowspan != 1
end