Class: Dsp::Api::V1::BaseController
- Inherits:
-
Object
- Object
- Dsp::Api::V1::BaseController
- Defined in:
- app/controllers/dsp/api/v1/base_controller.rb
Direct Known Subclasses
AgentController, ConfigController, HealthcheckController, MetricsController
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(env) ⇒ BaseController
constructor
A new instance of BaseController.
Constructor Details
#initialize(env) ⇒ BaseController
Returns a new instance of BaseController.
9 10 11 12 13 14 |
# File 'app/controllers/dsp/api/v1/base_controller.rb', line 9 def initialize(env) @env = env @request = Rack::Request.new(env) @path = request.path @method = request.request_method end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
7 8 9 |
# File 'app/controllers/dsp/api/v1/base_controller.rb', line 7 def env @env end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
7 8 9 |
# File 'app/controllers/dsp/api/v1/base_controller.rb', line 7 def method @method end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'app/controllers/dsp/api/v1/base_controller.rb', line 7 def path @path end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
7 8 9 |
# File 'app/controllers/dsp/api/v1/base_controller.rb', line 7 def request @request end |