Module: ActivePodio::Updatable::InstanceMethods
- Defined in:
- lib/podio/active_podio/updatable.rb
Instance Method Summary collapse
Instance Method Details
#remove_nil_values(input_hash) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/podio/active_podio/updatable.rb', line 13 def remove_nil_values(input_hash) input_hash.inject({}) do |hash, (key, value)| hash[key] = value if value.present? hash end end |
#update_attributes(attributes) ⇒ Object
7 8 9 10 11 |
# File 'lib/podio/active_podio/updatable.rb', line 7 def update_attributes(attributes) attributes.each do |key, value| self.send("#{key}=".to_sym, value.presence) end end |