Class: Dev::DateRange::Hourly

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#dateObject

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

#currentObject

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

#nextObject

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

#previousObject

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