Class: Bijou::Console::Request
- Inherits:
-
HttpRequest
- Object
- HttpRequest
- Bijou::Console::Request
- Defined in:
- lib/bijou/console/request.rb
Overview
A very simple request object that takes a query string from the command line and feeds it to the component.
Instance Attribute Summary
Attributes inherited from HttpRequest
#cookies, #form, #http_method, #params, #query_string, #server_variables
Instance Method Summary collapse
-
#initialize(qs) ⇒ Request
constructor
A new instance of Request.
Methods inherited from HttpRequest
#get, #physical_path, #post, #referer, #referrer, #request_method, #user_agent, #virtual_path
Constructor Details
#initialize(qs) ⇒ Request
Returns a new instance of Request.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bijou/console/request.rb', line 12 def initialize(qs) super() query_string = ::CGI::parse(qs) || {} @query_string = Bijou::MiniCGI.singularize(query_string) @form = @query_string.clone @params = @query_string.clone @http_method = 'GET' end |