Class: RiCal::PropertyValue::RecurrenceRule::OccurrenceIncrementer::ByMinuteIncrementer

Inherits:
ListIncrementer show all
Defined in:
lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from ListIncrementer

#cycle_start, #list, #occurrences, #outer_occurrence

Attributes inherited from RiCal::PropertyValue::RecurrenceRule::OccurrenceIncrementer

#contains_daily_incrementer, #contains_weeknum_incrementer, #current_occurrence, #leaf_iterator, #outer_incrementers, #outer_range, #sub_cycle_incrementer

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ListIncrementer

#candidate_acceptable?, conditional_incrementer, #cycle_adjust, #first_within_outer_cycle, #get_next_occurrences, #initialize, #next_candidate, #next_cycle, #next_in_list, #occurrences_for, #occurrences_within, #unneeded?

Methods inherited from RiCal::PropertyValue::RecurrenceRule::OccurrenceIncrementer

#add_outer_incrementer, #contains_daily_incrementer?, #contains_weeknum_incrementer?, #daily_incrementer?, #first_sub_occurrence, from_rrule, #in_outer_cycle?, #initialize, #next_cycle, #next_time, #outermost?, #short_name, #to_s, #update_cycle_range, #weeknum_incrementer?

Methods included from TimeManipulation

#advance_day, #advance_month, #advance_week, #advance_year, #first_day_of_month, #first_day_of_week, #first_day_of_year, #first_hour_of_day

Constructor Details

This class inherits a constructor from RiCal::PropertyValue::RecurrenceRule::OccurrenceIncrementer::ListIncrementer

Class Method Details

.for_rrule(rrule) ⇒ Object



6
7
8
# File 'lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb', line 6

def self.for_rrule(rrule)
  conditional_incrementer(rrule, :byminute, MinutelyIncrementer)
end

Instance Method Details

#advance_cycle(date_time) ⇒ Object



10
11
12
# File 'lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb', line 10

def advance_cycle(date_time)
  date_time.advance(:hours => 1).start_of_hour
end

#end_of_occurrence(date_time) ⇒ Object



18
19
20
# File 'lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb', line 18

def end_of_occurrence(date_time)
  date_time.end_of_minute
end

#start_of_cycle(date_time) ⇒ Object



14
15
16
# File 'lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb', line 14

def start_of_cycle(date_time)
  date_time.change(:min => 0)
end

#varying_time_attributeObject



22
23
24
# File 'lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb', line 22

def varying_time_attribute
  :min
end