Class: Flame::Request

Inherits:
Rack::Request
  • Object
show all
Defined in:
lib/flame/request.rb

Overview

Class for requests

Instance Method Summary collapse

Instance Method Details

#http_methodObject

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_partsObject

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