Class: Spreadshit::Window::SpreadsheetDelegate
- Inherits:
-
Object
- Object
- Spreadshit::Window::SpreadsheetDelegate
- Defined in:
- lib/spreadshit/window.rb
Instance Method Summary collapse
- #cell_content(&block) ⇒ Object
- #cell_updated(&block) ⇒ Object
- #cell_value(&block) ⇒ Object
-
#initialize ⇒ SpreadsheetDelegate
constructor
A new instance of SpreadsheetDelegate.
Constructor Details
#initialize ⇒ SpreadsheetDelegate
Returns a new instance of SpreadsheetDelegate.
15 16 17 |
# File 'lib/spreadshit/window.rb', line 15 def initialize @cell_updated, @cell_value, @cell_content = Proc.new {} end |
Instance Method Details
#cell_content(&block) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/spreadshit/window.rb', line 35 def cell_content(&block) if block_given? @cell_content = block else @cell_content end end |
#cell_updated(&block) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/spreadshit/window.rb', line 19 def cell_updated(&block) if block_given? @cell_updated = block else @cell_updated end end |
#cell_value(&block) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/spreadshit/window.rb', line 27 def cell_value(&block) if block_given? @cell_value = block else @cell_value end end |