Module: DateBook::ActsAsEventOccurrence::InstanceMethods

Defined in:
lib/date_book/concerns/acts_as_event_occurrence.rb

Overview

Instance Methods

Instance Method Summary collapse

Instance Method Details

#end_momentObject Also known as: end



56
57
58
59
60
61
62
# 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

#popover_urlObject



43
44
45
# File 'lib/date_book/concerns/acts_as_event_occurrence.rb', line 43

def popover_url
  event.popover_url(self)
end

#start_momentObject Also known as: start



47
48
49
50
51
52
53
# 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

#urlObject



39
40
41
# File 'lib/date_book/concerns/acts_as_event_occurrence.rb', line 39

def url
  event.url(self)
end