Class: Classlist::Reset
- Defined in:
- lib/classlist/reset.rb
Overview
Classlist::Reset is an operation that removes all tokens from the original classlist when merged.
Constant Summary
Constants inherited from Classlist
Instance Attribute Summary
Attributes inherited from Classlist
Instance Method Summary collapse
- #merge(original) ⇒ Object
-
#resolve(original) ⇒ Object
#resolve changes the original classlist.
Methods inherited from Classlist
#+, #==, #add, #add_operation, #include?, #initialize, #item, #length, #remove, #replace, #resolve_operations, #to_a, #to_s, #toggle
Constructor Details
This class inherits a constructor from Classlist
Instance Method Details
#merge(original) ⇒ Object
8 9 10 |
# File 'lib/classlist/reset.rb', line 8 def merge(original) original.entries.replace(entries) end |
#resolve(original) ⇒ Object
#resolve changes the original classlist
13 14 15 16 17 |
# File 'lib/classlist/reset.rb', line 13 def resolve(original) original.entries.replace(entries) super end |