Class String
In: lib/ruby_units/string.rb
Parent: Object

make a string into a unit

Methods

%   after   ago   before   before_now   datetime   from   from_now   since   time   to   to_date   to_datetime   to_time   to_unit   u   unit   until  

External Aliases

% -> unit_format
from -> old_from

Public Instance methods

format unit output using formating codes ’%0.2f’ % ‘1 mm’.unit => ‘1.00 mm’

after(time_point = ::Time.now)

Alias for from

before_now(time_point = ::Time.now)

Alias for before

from_now(time_point = ::Time.now)

Alias for from

u(other = nil)

Alias for to_unit

unit(other = nil)

Alias for to_unit

[Validate]