module CurrencyCloud::Actions::Update

Public Class Methods

extended(base) click to toggle source
# File lib/currency_cloud/actions/update.rb, line 4
def self.extended(base)
  base.send(:include, Save) # Private before Ruby 2.1
end

Public Instance Methods

update(id, params) click to toggle source

TODO: Add .save instance method, which calls update on changed attributes

# File lib/currency_cloud/actions/update.rb, line 10
def update(id, params)
  attrs = client.post(id.to_s, params)
  new(attrs)
end