Class: Undo::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/undo/config.rb

Instance Method Summary collapse

Instance Method Details

#filter(options) ⇒ Object



18
19
20
21
# File 'lib/undo/config.rb', line 18

def filter(options)
  attribute_names = attribute_set.map(&:name)
  options.reject { |key, _| attribute_names.include? key.to_sym }
end

#with(attribute_updates = {}) ⇒ Object



14
15
16
# File 'lib/undo/config.rb', line 14

def with(attribute_updates = {})
  self.class.new attributes.merge attribute_updates
end