Parent

Methods

String

Assumes Time::Units and Numeric mixins are available.

Public Instance Methods

in_seconds() click to toggle source
# File lib/familia/core_ext.rb, line 32
def in_seconds
  # "60m" => ["60", "m"]
  q,u = self.scan(/([\d\.]+)([s,m,h])?/).flatten
  q &&= q.to_f and u ||= 's'
  q &&= q.in_seconds(u)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.