Class: WrapExcel::Cell

Inherits:
Object
  • Object
show all
Defined in:
lib/wrap_excel/cell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(win32_cell) ⇒ Cell

Returns a new instance of Cell.



7
8
9
10
11
12
13
# File 'lib/wrap_excel/cell.rb', line 7

def initialize(win32_cell)
  if win32_cell.MergeCells
    @cell = win32_cell.MergeArea.Item(1,1)
  else
    @cell = win32_cell
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(id, *args) ⇒ Object



15
16
17
# File 'lib/wrap_excel/cell.rb', line 15

def method_missing(id, *args)
  @cell.send(id, *args)
end

Instance Attribute Details

#cellObject (readonly)

Returns the value of attribute cell.



5
6
7
# File 'lib/wrap_excel/cell.rb', line 5

def cell
  @cell
end