Parent

Included Modules

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

precision[R]

Public Class Methods

day() click to toggle source
# File lib/runt/dprecision.rb, line 92
def Precision.day
  new(DAY_PREC)
end
hour() click to toggle source
# File lib/runt/dprecision.rb, line 96
def Precision.hour
  new(HOUR_PREC)
end
millisec() click to toggle source
# File lib/runt/dprecision.rb, line 108
def Precision.millisec
  new(MILLI_PREC)
end
min() click to toggle source
# File lib/runt/dprecision.rb, line 100
def Precision.min
  new(MIN_PREC)
end
month() click to toggle source
# File lib/runt/dprecision.rb, line 84
def Precision.month
  new(MONTH_PREC)
end
new(prec) click to toggle source
# File lib/runt/dprecision.rb, line 116
def initialize(prec)
  @precision = prec
end
sec() click to toggle source
# File lib/runt/dprecision.rb, line 104
def Precision.sec
  new(SEC_PREC)
end
week() click to toggle source
# File lib/runt/dprecision.rb, line 88
def Precision.week
  new(WEEK_PREC)
end
year() click to toggle source
# File lib/runt/dprecision.rb, line 80
def Precision.year
  new(YEAR_PREC)
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/runt/dprecision.rb, line 120
def <=>(other)
  self.precision <=> other.precision
end
===(other) click to toggle source
# File lib/runt/dprecision.rb, line 124
def ===(other)
  self.precision == other.precision
end
label() click to toggle source
# File lib/runt/dprecision.rb, line 132
def label
  LABEL[@precision]
end
min_value() click to toggle source
# File lib/runt/dprecision.rb, line 112
def min_value()
  FIELD_MIN[@precision]
end
to_s() click to toggle source
# File lib/runt/dprecision.rb, line 128
def to_s
  "DPrecision::#{self.label}"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.