Module: MongoidOccurrenceViews::Event::HasViewsOnOccurrences
- Defined in:
- lib/mongoid_occurrence_views/event/has_views_on_occurrences.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- ORDERING_VIEW_NAME_SUFFIX =
'occurrences_ordering_view'.freeze
- EXPANDED_VIEW_NAME_SUFFIX =
'expanded_occurrences_view'.freeze
Class Method Summary collapse
Instance Method Summary collapse
- #all_day ⇒ Object (also: #all_day?)
- #dtend ⇒ Object
- #dtstart ⇒ Object
Class Method Details
.included(base) ⇒ Object
7 8 9 |
# File 'lib/mongoid_occurrence_views/event/has_views_on_occurrences.rb', line 7 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#all_day ⇒ Object Also known as: all_day?
21 22 23 24 25 |
# File 'lib/mongoid_occurrence_views/event/has_views_on_occurrences.rb', line 21 def all_day return unless dtstart.present? && dtend.present? dtstart.to_i == dtstart.beginning_of_day.to_i && dtend.to_i == dtend.end_of_day.to_i end |
#dtend ⇒ Object
16 17 18 19 |
# File 'lib/mongoid_occurrence_views/event/has_views_on_occurrences.rb', line 16 def dtend return unless self.class.within_view? DateTime.demongoize(self[:_dtend]) end |
#dtstart ⇒ Object
11 12 13 14 |
# File 'lib/mongoid_occurrence_views/event/has_views_on_occurrences.rb', line 11 def dtstart return unless self.class.within_view? DateTime.demongoize(self[:_dtstart]) end |