class Rtype::Behavior::IntegerCheck
Public Instance Methods
error_message(value)
click to toggle source
# File lib/rtype/behavior/integer_check.rb, line 12 def error_message(value) "Expected #{value.inspect} to be an integer #{@condition} #{@x}" end
valid?(value)
click to toggle source
# File lib/rtype/behavior/integer_check.rb, line 4 def valid?(value) if value.is_a?(Integer) @lambda.call(value) else false end end