Sha256: 0ca60ee081892eb42520cd61c8f87e5d67371f4593f408d49ec3ef0d7ffc66f3

Contents?: true

Size: 288 Bytes

Versions: 9

Compression:

Stored size: 288 Bytes

Contents

module Cassanity
  def self.Increment(*args)
    Increment.new(*args)
  end

  class Increment < Operator
    # Public: Returns an increment instance
    def initialize(value = 1)
      raise ArgumentError.new("value cannot be nil") if value.nil?

      super :+, value
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cassanity-0.6.0 lib/cassanity/increment.rb
cassanity-0.6.0.beta5 lib/cassanity/increment.rb
cassanity-0.6.0.beta4 lib/cassanity/increment.rb
cassanity-0.6.0.beta3 lib/cassanity/increment.rb
cassanity-0.6.0.beta2 lib/cassanity/increment.rb
cassanity-0.6.0.beta1 lib/cassanity/increment.rb
cassanity-0.5.1 lib/cassanity/increment.rb
cassanity-0.5.0 lib/cassanity/increment.rb
cassanity-0.4.0 lib/cassanity/increment.rb