class MongoidOccurrences::DailyOccurrence

Attributes

operator[RW]

Public Instance Methods

<=>(other) click to toggle source
# File lib/mongoid_occurrences/daily_occurrence.rb, line 28
def <=>(other)
  sort_key <=> other.sort_key
end
all_day() click to toggle source
# File lib/mongoid_occurrences/daily_occurrence.rb, line 22
def all_day
  dtstart.to_i == dtstart.beginning_of_day.to_i &&
    dtend.to_i == dtend.end_of_day.to_i
end
Also aliased as: all_day?
all_day?()
Alias for: all_day
overlaps?(occurrence) click to toggle source
# File lib/mongoid_occurrences/daily_occurrence.rb, line 40
def overlaps?(occurrence)
  to_range.overlaps?(occurrence.to_range)
end
sort_key() click to toggle source
# File lib/mongoid_occurrences/daily_occurrence.rb, line 32
def sort_key
  [dtstart, dtend]
end
to_range() click to toggle source
# File lib/mongoid_occurrences/daily_occurrence.rb, line 36
def to_range
  (dtstart..dtend)
end