Method: AutoCounter#coerce

Defined in:
lib/activefacts/api/numeric.rb

#coerce(i) ⇒ Object

Coerce “i” to be of the same type as self



173
174
175
176
177
178
# File 'lib/activefacts/api/numeric.rb', line 173

def coerce(i)
  unless @value
    raise ArgumentError, "Illegal attempt to use the value of an uncommitted AutoCounter"
  end
  [ i.to_i, @value ]
end