Integer
# File lib/dm-types/epoch_time.rb, line 19 19: def custom? 20: true 21: end
# File lib/dm-types/epoch_time.rb, line 15 15: def dump(value) 16: value.to_i if value 17: end
# File lib/dm-types/epoch_time.rb, line 7 7: def load(value) 8: if value.kind_of?(::Numeric) 9: ::Time.at(value.to_i) 10: else 11: value 12: end 13: end
# File lib/dm-types/epoch_time.rb, line 23 23: def typecast(value) 24: case value 25: when ::Time then value 26: when ::Numeric, /\A\d+\z/ then ::Time.at(value.to_i) 27: when ::DateTime then datetime_to_time(value) 28: when ::String then ::Time.parse(value) 29: end 30: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.