Object
Add the ability to use Time class
Contributed by Paul Wright
# File lib/runt.rb, line 193 def initialize(*args) if(args[0].instance_of?(Runt::DPrecision::Precision)) @precision=args.shift else @precision=Runt::DPrecision::SEC end old_initialize(*args) end
# File lib/runt.rb, line 213 def parse(*args) precision=Runt::DPrecision::DEFAULT if(args[0].instance_of?(Runt::DPrecision::Precision)) precision=args.shift end _parse=old_parse(*args) _parse.date_precision=precision _parse end
# File lib/runt.rb, line 203 def to_yaml(options) if self.instance_variables.empty? self.old_to_yaml(options) else Time.old_parse(self.to_s).old_to_yaml(options) end end
Generated with the Darkfish Rdoc Generator 2.