Sha256: 11a22b07c0d82d91b5576ba889615438d4435cdd541f5828631c35e27c53646f

Contents?: true

Size: 286 Bytes

Versions: 5

Compression:

Stored size: 286 Bytes

Contents

# frozen_string_literal: true

module NCMB
  class Increment
    include NCMB
    
    def initialize(amount = 1)
      @amount = amount
    end
    
    def to_json(a)
      "{\"__op\": \"Increment\", \"amount\": #{@amount}}"
    end
    
    def amount
      @amount
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ncmb-ruby-client-0.2.0 lib/ncmb/increment.rb
ncmb-ruby-client-0.1.7 lib/ncmb/increment.rb
ncmb-ruby-client-0.1.6 lib/ncmb/increment.rb
ncmb-ruby-client-0.1.5 lib/ncmb/increment.rb
ncmb-ruby-client-0.1.4 lib/ncmb/increment.rb