Class: DatasetExplorer::ValueEvaluator::TimeEvaluator

Inherits:
Object
  • Object
show all
Defined in:
lib/dataset_explorer/value_evaluator.rb

Instance Method Summary collapse

Instance Method Details

#accept?(value) ⇒ Boolean

Returns:

  • (Boolean)


78
79
80
81
82
83
84
85
86
# File 'lib/dataset_explorer/value_evaluator.rb', line 78

def accept?(value)
  if value.is_a?(String)
    return Time.parse(value.to_s)
  end

  value.is_a?(Time)
rescue ArgumentError
  false
end