Module: Vault::BulkAttributes
- Defined in:
- lib/vault/bulk_attributes.rb
Instance Method Summary collapse
Instance Method Details
#initialize(attrs = {}) ⇒ Object
3 4 5 6 |
# File 'lib/vault/bulk_attributes.rb', line 3 def initialize(attrs={}) update(attrs) changed_attributes.clear end |
#update(attrs = {}) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/vault/bulk_attributes.rb', line 8 def update(attrs={}) attrs.each do |key, value| method = "#{key}=" __send__(method, value) end self end |