Class: Classlist::Remove
- Defined in:
- lib/classlist/remove.rb
Overview
Classlist::Remove is an operation that removes tokens from the original classlist when added to it.
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/remove.rb', line 8 def merge(original) original.entries - entries end |
#resolve(original) ⇒ Object
#resolve changes the original classlist
13 14 15 16 17 18 19 |
# File 'lib/classlist/remove.rb', line 13 def resolve(original) entries.each do |entry| original.remove(entry) end super end |