Sha256: 5ad8ad6d5d0ba6505215d2baa51f4cac2a799456fc8e85556e5a07b84691871d
Contents?: true
Size: 399 Bytes
Versions: 125
Compression:
Stored size: 399 Bytes
Contents
# frozen_string_literal: true class ReeDatetime::SecondsAgo include Ree::FnDSL fn :seconds_ago do link :now link :seconds_since end doc("Returns a new date/time the specified number of seconds ago.") contract(Nilor[DateTime], Integer => DateTime) def call(date_time = nil, seconds_count) date_time = date_time || now seconds_since(date_time, -seconds_count) end end
Version data entries
125 entries across 125 versions & 1 rubygems