Module: Time::Units

Included in:
Numeric, DiffUnits
Defined in:
lib/timeunits.rb,
lib/timeunits-0.0.2.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#__less__Object



8
# File 'lib/timeunits.rb', line 8

def __less__() "/" end

#__more__Object



9
# File 'lib/timeunits.rb', line 9

def __more__() "*" end

#centuriesObject



21
# File 'lib/timeunits.rb', line 21

def centuries() decades.send(__more__,10) end

#daysObject



15
# File 'lib/timeunits.rb', line 15

def days() hours.send(__more__,24) end

#decadesObject



20
# File 'lib/timeunits.rb', line 20

def decades() years.send(__more__,10) end

#hoursObject



14
# File 'lib/timeunits.rb', line 14

def hours() minutes.send(__more__,60) end

#microsecondsObject



10
# File 'lib/timeunits.rb', line 10

def microseconds() Float(self.send(__more__,(10 ** -6))) end

#millisecondsObject



11
# File 'lib/timeunits.rb', line 11

def milliseconds() Float(self.send(__more__,(10 ** -3))) end

#minutesObject



13
# File 'lib/timeunits.rb', line 13

def minutes() seconds.send(__more__,60) end

#monthsObject



17
# File 'lib/timeunits.rb', line 17

def months() weeks.send(__more__,4) end

#secondsObject



12
# File 'lib/timeunits.rb', line 12

def seconds() self end

#weeksObject



16
# File 'lib/timeunits.rb', line 16

def weeks() days.send(__more__,7) end

#yearsObject

def years() months.send(__more__,12) end



19
# File 'lib/timeunits.rb', line 19

def years() days.send(__more__,365) end