Class IceCube::Schedule
In: lib/ice_cube/schedule.rb
Parent: Object

Methods

Attributes

end_time  [R]  Get the end time
start_time  [R]  Get the start time

Public Class methods

Load the schedule from ical

Public Instance methods

==(other)

Alias for eql?

Add an exception rule to the schedule

Add an exception time to the schedule

Add a recurrence rule to the schedule

Add a recurrence time to the schedule

Emit an enumerator based on the start time

Determine if this schedule conflicts with another schedule @param [IceCube::Schedule] other_schedule - The schedule to compare to @param [Time] closing_time - the last time to consider @return [Boolean] whether or not the schedules conflict at all

Hook for YAML.dump, enables to_yaml

Get the exception rules

Get the exception times that are on the schedule

exrule(rule)

Alias for add_exception_rule

exrules()

Alias for exception_rules

extime(time)

Alias for add_exception_time

extimes()

Alias for exception_times

Get the first n occurrences, or the first occurrence if n is skipped

Get the final n occurrences of a terminating schedule or the final one if no n is given

The next occurrence after now (overridable)

Get all of the occurrences from the start_time up until a given Time

Determine if the schedule is occurring at a given time

Return a boolean indicating if an occurrence is occurring between two times, inclusive of its duration. This counts zero-length occurrences that intersect the start of the range and within the range, but not occurrences at the end of the range since none of their duration intersects the range.

Determine if the schedule occurs at a specific time

Return a boolean indicating if an occurrence falls between two times

Return a boolean indicating if an occurrence falls on a certain date

The previous occurrence from a given time

The previous n occurrences before a given time

Get the recurrence rules

Get the recurrence times that are on the schedule

Remove an exception rule

Remove an exception time

remove_extime(time)

Remove a recurrence rule

Remove a recurrence time

remove_rtime(time)
rrule(rule)
rrules()

Alias for recurrence_rules

rtime(time)
rtimes()

Alias for recurrence_times

Determine if the schedule will end @return [Boolean] true if ending, false if repeating forever

to_h()

Alias for to_hash

Convert the schedule to a hash

Serialize this schedule to_ical

String serialization

[Validate]