Class: Arrow::TimeUnit

Inherits:
Object
  • Object
show all
Defined in:
lib/arrow/time-unit.rb

Class Method Summary collapse

Class Method Details

.try_convert(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



22
23
24
25
26
27
28
# File 'lib/arrow/time-unit.rb', line 22

def try_convert(value)
  if value.is_a?(Hash) and value.size == 1 and value[:unit]
    super(value[:unit])
  else
    super
  end
end