Sha256: 57510b578fbb1df49e9f82b527ddc244a9d1f22c0a8a44c5e3b1c51195af3544
Contents?: true
Size: 424 Bytes
Versions: 126
Compression:
Stored size: 424 Bytes
Contents
# frozen_string_literal: true class ReeDatetime::AllHour include Ree::FnDSL fn :all_hour do link :now link :beginning_of_hour link :end_of_hour end doc("Returns a Range representing the whole hour of the current date/time.") contract(Nilor[DateTime] => RangeOf[DateTime]) def call(date_time = nil) date_time = date_time || now beginning_of_hour(date_time)..end_of_hour(date_time) end end
Version data entries
126 entries across 126 versions & 1 rubygems