class Ducktape::RangeValidator
Public Class Methods
matches?(obj)
click to toggle source
# File lib/ducktape/validators/range_validator.rb, line 11 def self.matches?(obj) obj.is_a?(Range) end
new(range)
click to toggle source
# File lib/ducktape/validators/range_validator.rb, line 3 def initialize(range) @range = range end
Public Instance Methods
validate(obj)
click to toggle source
# File lib/ducktape/validators/range_validator.rb, line 7 def validate(obj) @range.include?(obj) end