Class: Dev::DateRange::Hourly
- Defined in:
- lib/firespring_dev_commands/daterange.rb
Overview
Class contains methods for calculating a date range with an hourly interval
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
Instance Method Summary collapse
-
#current ⇒ Object
The hour interval for the current date.
-
#initialize(date = nil) ⇒ Hourly
constructor
A new instance of Hourly.
-
#next ⇒ Object
The hour interval after the current date.
-
#previous ⇒ Object
The hour interval previous to the current date.
Constructor Details
#initialize(date = nil) ⇒ Hourly
Returns a new instance of Hourly.
11 12 13 |
# File 'lib/firespring_dev_commands/daterange.rb', line 11 def initialize(date = nil) @date = date || DateTime.now end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
9 10 11 |
# File 'lib/firespring_dev_commands/daterange.rb', line 9 def date @date end |
Instance Method Details
#current ⇒ Object
The hour interval for the current date
21 22 23 |
# File 'lib/firespring_dev_commands/daterange.rb', line 21 def current raise 'not implemented' end |
#next ⇒ Object
The hour interval after the current date
26 27 28 |
# File 'lib/firespring_dev_commands/daterange.rb', line 26 def next raise 'not implemented' end |
#previous ⇒ Object
The hour interval previous to the current date
16 17 18 |
# File 'lib/firespring_dev_commands/daterange.rb', line 16 def previous raise 'not implemented' end |