Class: Time

Inherits:
Object
  • Object
show all
Includes:
Cubicle::DateTime
Defined in:
lib/cubicle/support.rb

Instance Method Summary collapse

Methods included from Cubicle::DateTime

#beginning_of, db_time_format, db_time_format=, #iso8601?, iso8601?, #to_cubicle

Instance Method Details

#step_byObject

iteration



6
7
8
# File 'lib/cubicle/support.rb', line 6

def step_by
  @step_by ||= :second
end

#step_by=(by) ⇒ Object



10
11
12
# File 'lib/cubicle/support.rb', line 10

def step_by=(by)
  @step_by = by
end

#succObject



14
15
16
17
18
# File 'lib/cubicle/support.rb', line 14

def succ
  next_date = advance(step_by.to_s.pluralize.to_sym=>1)
  next_date.step_by = self.step_by
  next_date
end