Class: Dsp::Api::V1::BaseController

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/dsp/api/v1/base_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#envObject (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

#methodObject (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

#pathObject (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

#requestObject (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