Sha256: 40651e351bb97ce09351a850902c04aff3eb7a01ba1c4bfe6d2d29b69e9c54ca

Contents?: true

Size: 361 Bytes

Versions: 18

Compression:

Stored size: 361 Bytes

Contents

module CurrencyCloud
  module Actions
    module Update
      def self.extended(base)
        base.send(:include, Save) # Private before Ruby 2.1
      end

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

      def update(id, params)
        attrs = client.post(id.to_s, params)
        new(attrs)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
currency_cloud-1.5.0 lib/currency_cloud/actions/update.rb
currency_cloud-1.4.0 lib/currency_cloud/actions/update.rb
currency_cloud-1.3.1 lib/currency_cloud/actions/update.rb
currency_cloud-1.3.0 lib/currency_cloud/actions/update.rb
currency_cloud-1.2.1 lib/currency_cloud/actions/update.rb
currency_cloud-1.1.4 lib/currency_cloud/actions/update.rb
currency_cloud-1.0.3 lib/currency_cloud/actions/update.rb
currency_cloud-0.17.7 lib/currency_cloud/actions/update.rb
currency_cloud-0.16.2 lib/currency_cloud/actions/update.rb
currency_cloud-0.15.8 lib/currency_cloud/actions/update.rb
currency_cloud-0.14.2 lib/currency_cloud/actions/update.rb
currency_cloud-0.12.5 lib/currency_cloud/actions/update.rb
currency_cloud-0.12.4 lib/currency_cloud/actions/update.rb
currency_cloud-0.11.2 lib/currency_cloud/actions/update.rb
currency_cloud-0.10.0 lib/currency_cloud/actions/update.rb
currency_cloud-0.9.0 lib/currency_cloud/actions/update.rb
currency_cloud-0.8.2 lib/currency_cloud/actions/update.rb
currency_cloud-0.8.0 lib/currency_cloud/actions/update.rb