Class: Report::WebSitePerformance::WebSitePerformanceCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Report::WebSitePerformance::WebSitePerformanceCommand
- Defined in:
- app/services/report/web_site_performance/web_site_performance_command.rb
Overview
Command pattern to encapsulate parameters necessary to run a presence report
Constant Summary collapse
- DATA_RANGE_OPTIONS =
[['Last 7 days',1],['This Month',2],['Last 30 Days',3],['Last Month',4],['Last 90 Days',5],['This Year',6],['Last 365 Days',7]]
- PERIOD_OPTIONS =
[['vs Previous period',1],['vs Previous year',2]]
- BREAKDOWN_OPTIONS =
[['Day',1],['Week',2],['Month',3]]
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
20 21 22 23 |
# File 'app/services/report/web_site_performance/web_site_performance_command.rb', line 20 def execute return unless valid? @result = Report::WebSitePerformance::WebSitePerformance.web_site_performance_result(attributes) end |
#success? ⇒ Boolean
25 26 27 |
# File 'app/services/report/web_site_performance/web_site_performance_command.rb', line 25 def success? valid? && @result.success? end |