Class: ProductAnalytics::BuildGraphService
- Inherits:
-
Object
- Object
- ProductAnalytics::BuildGraphService
- Defined in:
- app/services/product_analytics/build_graph_service.rb
Direct Known Subclasses
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project, params) ⇒ BuildGraphService
constructor
A new instance of BuildGraphService.
Constructor Details
#initialize(project, params) ⇒ BuildGraphService
Returns a new instance of BuildGraphService.
5 6 7 8 |
# File 'app/services/product_analytics/build_graph_service.rb', line 5 def initialize(project, params) @project = project @params = params end |
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/services/product_analytics/build_graph_service.rb', line 10 def execute graph = @params[:graph].to_sym timerange = @params[:timerange].days results = product_analytics_events.count_by_graph(graph, timerange) format_results(graph, results) end |