Class: EIRReportInterface::EIRReportInterfaceController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/eir_report_interface/eir_report_interface_controller.rb

Overview

EIRReportInterfaceController handles requests for generating weeks and months data.

Instance Method Summary collapse

Instance Method Details

#months_generatorObject

Generates months data and renders it as JSON.



14
15
16
# File 'app/controllers/eir_report_interface/eir_report_interface_controller.rb', line 14

def months_generator
  render json: service.months_generator
end

#serviceObject

Provides access to the service object.



19
20
21
# File 'app/controllers/eir_report_interface/eir_report_interface_controller.rb', line 19

def service
  EIRReportInterface::EIRReportInterfaceService
end

#weeks_generatorObject

Generates weeks data and renders it as JSON.



9
10
11
# File 'app/controllers/eir_report_interface/eir_report_interface_controller.rb', line 9

def weeks_generator
  render json: service.weeks_generator
end