second

second() Instance Public methods Alias for: seconds

seconds

seconds() Instance Public methods Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years. These methods use Time#advance for precise date calculations when using #from_now, ago, etc. as well as adding or subtracting their results from a Time object. For example: # equivalent to Time.current.advance(months: 1) 1.month.from_now # equivalent to Time.current.advance(years: 2) 2.years.from_now # equivalent to Time.current.advance(months: 4, years: 5

since

since(time = ::Time.current) Instance Public methods Reads best with argument: 10.minutes.since(time) from_now

terabyte

terabyte() Instance Public methods Alias for: terabytes

terabytes

terabytes() Instance Public methods Also aliased as: terabyte

to_formatted_s

to_formatted_s(format = :default, options = {}) Instance Public methods Provides options for converting numbers into formatted strings. Options are provided for phone numbers, currency, percentage, precision, positional notation, file size and pretty printing. Options For details on which formats use which options, see ActiveSupport::NumberHelper Examples Phone Numbers: 5551234.to_s(:phone) # => 555-1234 1235551234.to_s(:phone)

until

until(time = ::Time.current) Instance Public methods Reads best with argument: 10.minutes.until(time) ago

week

week() Instance Public methods Alias for: weeks

weeks

weeks() Instance Public methods Also aliased as: week

acts_like?

acts_like?(duck) Instance Public methods A duck-type assistant method. For example, Active Support extends Date to define an acts_like_date? method, and extends Time to define acts_like_time?. As a result, we can do x.acts_like?(:time) and x.acts_like?(:date) to do duck-type-safe comparisons, since classes that we want to act like Time simply need to define an acts_like_time? method.