Module: ReportDaily
- Extended by:
- ActiveSupport::Concern
- Included in:
- Reports::AnalyticsDaily
- Defined in:
- app/models/concerns/report_daily.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#end_datetime ⇒ Object
13 14 15 |
# File 'app/models/concerns/report_daily.rb', line 13 def end_datetime DateTime.new(report_date.year, report_date.month, report_date.day, 23, 59, 59) end |
#previous_report ⇒ Object
17 18 19 |
# File 'app/models/concerns/report_daily.rb', line 17 def previous_report self.class.where(report_date: report_date - 1.day).first end |
#start_datetime ⇒ Object
9 10 11 |
# File 'app/models/concerns/report_daily.rb', line 9 def start_datetime DateTime.new(report_date.year, report_date.month, report_date.day, 0, 0, 0) end |