class Rtype::Behavior::FloatCheck

Public Instance Methods

error_message(value) click to toggle source
# File lib/rtype/behavior/float_check.rb, line 12
def error_message(value)
        "Expected #{value.inspect} to be a float #{@condition} #{@x}"
end
valid?(value) click to toggle source
# File lib/rtype/behavior/float_check.rb, line 4
def valid?(value)
        if value.is_a?(Float)
                @lambda.call(value)
        else
                false
        end
end