Class: Flame::Request
- Inherits:
-
Rack::Request
- Object
- Rack::Request
- Flame::Request
- Defined in:
- lib/flame/request.rb
Overview
Class for requests
Instance Method Summary collapse
-
#http_method ⇒ Object
Override HTTP-method of the request if the param ‘_method’ found.
-
#path_parts ⇒ Object
Split path of the request to parts (Array of String).
Instance Method Details
#http_method ⇒ Object
Override HTTP-method of the request if the param ‘_method’ found
10 11 12 |
# File 'lib/flame/request.rb', line 10 def http_method params['_method'] || request_method end |
#path_parts ⇒ Object
Split path of the request to parts (Array of String)
5 6 7 |
# File 'lib/flame/request.rb', line 5 def path_parts @path_parts ||= path_info.to_s.split('/').reject(&:empty?) end |