module DateBook::ActsAsEventOccurrence::InstanceMethods

Instance Methods

Public Instance Methods

end()
Alias for: end_moment
end_moment() click to toggle source
# File lib/date_book/concerns/acts_as_event_occurrence.rb, line 56
def end_moment
  if schedule.all_day
    I18n.localize end_date, format: :moment_date
  else
    I18n.localize end_date, format: :moment_datetime
  end
end
Also aliased as: end
popover_url() click to toggle source
# File lib/date_book/concerns/acts_as_event_occurrence.rb, line 43
def popover_url
  event.popover_url(self)
end
start()
Alias for: start_moment
start_moment() click to toggle source
# File lib/date_book/concerns/acts_as_event_occurrence.rb, line 47
def start_moment
  if schedule.all_day
    I18n.localize date, format: :moment_date
  else
    I18n.localize date, format: :moment_datetime
  end
end
Also aliased as: start
url() click to toggle source
# File lib/date_book/concerns/acts_as_event_occurrence.rb, line 39
def url
  event.url(self)
end

Private Instance Methods

set_end_date() click to toggle source
# File lib/date_book/concerns/acts_as_event_occurrence.rb, line 67
def set_end_date
  self.end_date = date + schedulable.schedule.duration
end