Class: Spreadshit::Window::SpreadsheetDelegate

Inherits:
Object
  • Object
show all
Defined in:
lib/spreadshit/window.rb

Instance Method Summary collapse

Constructor Details

#initializeSpreadsheetDelegate

Returns a new instance of SpreadsheetDelegate.



16
17
18
# File 'lib/spreadshit/window.rb', line 16

def initialize
  @cell_updated, @cell_value, @cell_content = Proc.new {}
end

Instance Method Details

#cell_content(&block) ⇒ Object



36
37
38
39
40
41
42
# File 'lib/spreadshit/window.rb', line 36

def cell_content(&block)
  if block_given?
    @cell_content = block
  else
    @cell_content
  end
end

#cell_updated(&block) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/spreadshit/window.rb', line 20

def cell_updated(&block)
  if block_given?
    @cell_updated = block
  else
    @cell_updated
  end
end

#cell_value(&block) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/spreadshit/window.rb', line 28

def cell_value(&block)
  if block_given?
    @cell_value = block
  else
    @cell_value
  end
end