Method: Coopy::CombinedTable#initialize
- Defined in:
- lib/lib/coopy/combined_table.rb
#initialize(t) ⇒ CombinedTable
Returns a new instance of CombinedTable.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/lib/coopy/combined_table.rb', line 7 def initialize(t) @t = t @dx = 0 @dy = 0 @core = t @head = nil return if t.get_width < 1 || t.get_height < 1 v = t.get_cell_view return if v.to_s(t.get_cell(0,0)) != "@@" @dx = 1 @dy = 0 begin _g1 = 0 _g = t.get_height while(_g1 < _g) y = _g1 _g1+=1 txt = v.to_s(t.get_cell(0,y)) break if txt == nil || txt == "" || txt == "null" @dy+=1 end end @head = ::Coopy::CombinedTableHead.new(self,@dx,@dy) @body = ::Coopy::CombinedTableBody.new(self,@dx,@dy) @core = @body @meta = ::Coopy::SimpleMeta.new(@head) end |