class Opi::Request
Public Instance Methods
accept()
click to toggle source
# File lib/opi/request.rb, line 8 def accept @env['HTTP_ACCEPT'].to_s.split(',').map { |a| a.strip } end
method()
click to toggle source
# File lib/opi/request.rb, line 22 def method @env['REQUEST_METHOD'] end
path()
click to toggle source
# File lib/opi/request.rb, line 12 def path @path = @env["PATH_INFO"] @path = '/' if @path.nil? or @path.strip.empty? @path end
path_components()
click to toggle source
# File lib/opi/request.rb, line 26 def path_components @path_components ||= path.split('/') end
uri()
click to toggle source
# File lib/opi/request.rb, line 18 def uri @env["REQUEST_URI"] end
user_agent()
click to toggle source
# File lib/opi/request.rb, line 4 def user_agent @env['HTTP_USER_AGENT'] end