module HaystackRuby::Types::Time
Since there is no Ruby Hour class, value is a string “hr:minute”
Public Instance Methods
set_fields(str_value)
click to toggle source
# File lib/haystack_ruby/types/time.rb, line 5 def set_fields str_value @haystack_type = 'Time' match = /\Ah:([0-9:]*)\z/.match str_value begin @value = match[1] rescue Exception=>e raise HaystackRuby::Error, "invalid HaystackRuby::Types::Time #{str_value}. Error #{e}" end end