Class: Hyalite::Updates::NestedUpdate
- Includes:
- TransactionWrapper
- Defined in:
- lib/hyalite/updates.rb
Instance Method Summary collapse
- #close ⇒ Object
- #init ⇒ Object
-
#initialize(dirty_components) ⇒ NestedUpdate
constructor
A new instance of NestedUpdate.
Constructor Details
#initialize(dirty_components) ⇒ NestedUpdate
Returns a new instance of NestedUpdate.
11 12 13 |
# File 'lib/hyalite/updates.rb', line 11 def initialize(dirty_components) @dirty_components = dirty_components end |
Instance Method Details
#close ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/hyalite/updates.rb', line 19 def close if @dirty_components.length - @init_length > 0 @dirty_components.shift(@init_length) else @dirty_components.clear end end |
#init ⇒ Object
15 16 17 |
# File 'lib/hyalite/updates.rb', line 15 def init @init_length = @dirty_components.length end |