Class: Undo::Config
- Inherits:
-
Object
- Object
- Undo::Config
- Defined in:
- lib/undo/config.rb
Instance Method Summary collapse
Instance Method Details
#filter(options) ⇒ Object
29 30 31 32 33 |
# File 'lib/undo/config.rb', line 29 def filter() .delete_if do |key, _| attributes.keys.include? key end end |
#with(attribute_updates = {}, &block) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/undo/config.rb', line 22 def with(attribute_updates = {}, &block) config = attribute_updates.empty? ? self : self.class.new(attribute_set.get(self).merge attribute_updates) block_given? ? block.call(config) : config end |