Method: SafeType::Time#is_valid?

Defined in:
lib/safe_type/primitive/time.rb

#is_valid?(input) ⇒ Boolean

Returns:



9
10
11
12
13
# File 'lib/safe_type/primitive/time.rb', line 9

def is_valid?(input)
  return false unless @from.nil? || input >= @from
  return false unless @to.nil? || input <= @to
  super
end