Class: RowChange
- Inherits:
-
Object
- Object
- RowChange
- Defined in:
- lib/coopy/row_change.rb
Instance Attribute Summary collapse
-
#cells ⇒ Object
Returns the value of attribute cells.
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#key ⇒ Object
Returns the value of attribute key.
-
#row_mode ⇒ Object
Returns the value of attribute row_mode.
Instance Method Summary collapse
- #active_columns ⇒ Object
-
#initialize(row_mode, cells) ⇒ RowChange
constructor
A new instance of RowChange.
- #new_value_at(column) ⇒ Object
- #value_at(column) ⇒ Object
Constructor Details
#initialize(row_mode, cells) ⇒ RowChange
Returns a new instance of RowChange.
7 8 9 10 11 |
# File 'lib/coopy/row_change.rb', line 7 def initialize(row_mode,cells) @row_mode = row_mode @cells = cells @key = nil end |
Instance Attribute Details
#cells ⇒ Object
Returns the value of attribute cells.
3 4 5 |
# File 'lib/coopy/row_change.rb', line 3 def cells @cells end |
#columns ⇒ Object
Returns the value of attribute columns.
4 5 6 |
# File 'lib/coopy/row_change.rb', line 4 def columns @columns end |
#key ⇒ Object
Returns the value of attribute key.
5 6 7 |
# File 'lib/coopy/row_change.rb', line 5 def key @key end |
#row_mode ⇒ Object
Returns the value of attribute row_mode.
2 3 4 |
# File 'lib/coopy/row_change.rb', line 2 def row_mode @row_mode end |
Instance Method Details
#active_columns ⇒ Object
13 14 15 16 |
# File 'lib/coopy/row_change.rb', line 13 def active_columns return [] if @columns.nil? @columns.column_by_offset end |
#new_value_at(column) ⇒ Object
22 23 24 |
# File 'lib/coopy/row_change.rb', line 22 def new_value_at(column) @cells[column[:in_offset]][:new_value] end |
#value_at(column) ⇒ Object
18 19 20 |
# File 'lib/coopy/row_change.rb', line 18 def value_at(column) @cells[column[:in_offset]][:value] end |