Class: Rambo::ApplicationRequest
- Inherits:
-
Request
- Object
- Rack::Request
- Request
- Rambo::ApplicationRequest
show all
- Defined in:
- lib/rambo/application_request.rb
Instance Method Summary
collapse
Methods inherited from Request
#accept, #application_context, #application_context=, #default_controller, #params, #path, #path_components, #uri, #user_agent
Constructor Details
Returns a new instance of ApplicationRequest.
4
5
6
|
# File 'lib/rambo/application_request.rb', line 4
def initialize(env)
super
end
|
Instance Method Details
#action ⇒ Object
16
17
18
|
# File 'lib/rambo/application_request.rb', line 16
def action
path_components[3] || 'index'
end
|
#application ⇒ Object
8
9
10
|
# File 'lib/rambo/application_request.rb', line 8
def application
path_components[1]
end
|
#controller ⇒ Object
12
13
14
|
# File 'lib/rambo/application_request.rb', line 12
def controller
path_components[2] || default_controller
end
|
#controller_class ⇒ Object
20
21
22
|
# File 'lib/rambo/application_request.rb', line 20
def controller_class
self.application.gsub(/^[a-z]|\s+[a-z]/) { |a| a.upcase } + '::' + super
end
|