class Runt::DPrecision::Precision
Simple value class for keeping track of precisioned dates
Constants
- DAY_PREC
- FIELD_MIN
-
Minimun values that precisioned fields get set to
- HOUR_PREC
- LABEL
-
String values for display
- MILLI_PREC
- MIN_PREC
- MONTH_PREC
- SEC_PREC
- WEEK_PREC
- YEAR_PREC
-
Some constants w/arbitrary integer values used internally for comparisions
Attributes
Public Class Methods
Source
# File lib/runt/dprecision.rb, line 108 def Precision.millisec new(MILLI_PREC) end
Source
# File lib/runt/dprecision.rb, line 116 def initialize(prec) @precision = prec end
Public Instance Methods
Source
# File lib/runt/dprecision.rb, line 120 def <=>(other) self.precision <=> other.precision end
Source
# File lib/runt/dprecision.rb, line 124 def ===(other) self.precision == other.precision end
Source
# File lib/runt/dprecision.rb, line 112 def min_value() FIELD_MIN[@precision] end