Class: Egalite::Request
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#action_method ⇒ Object
Returns the value of attribute action_method.
-
#authorization ⇒ Object
Returns the value of attribute authorization.
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#controller_class ⇒ Object
Returns the value of attribute controller_class.
-
#cookies ⇒ Object
Returns the value of attribute cookies.
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
-
#inner_path ⇒ Object
Returns the value of attribute inner_path.
-
#language ⇒ Object
Returns the value of attribute language.
-
#method ⇒ Object
Returns the value of attribute method.
-
#params ⇒ Object
Returns the value of attribute params.
-
#path_info ⇒ Object
Returns the value of attribute path_info.
-
#path_params ⇒ Object
Returns the value of attribute path_params.
-
#rack_request ⇒ Object
readonly
Returns the value of attribute rack_request.
-
#route ⇒ Object
Returns the value of attribute route.
-
#session ⇒ Object
Returns the value of attribute session.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
- #accept_language ⇒ Object
- #host ⇒ Object
-
#initialize(values = {}) ⇒ Request
constructor
A new instance of Request.
- #ipaddr ⇒ Object
- #path ⇒ Object
- #port ⇒ Object
- #referrer ⇒ Object
- #scheme ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(values = {}) ⇒ Request
Returns a new instance of Request.
370 371 372 373 374 375 376 |
# File 'lib/egalite.rb', line 370 def initialize(values = {}) @cookies = [] @rack_request = values[:rack_request] @handler = values[:handler] @rack_env = values[:rack_env] @time = Time.now end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
366 367 368 |
# File 'lib/egalite.rb', line 366 def action @action end |
#action_method ⇒ Object
Returns the value of attribute action_method.
367 368 369 |
# File 'lib/egalite.rb', line 367 def action_method @action_method end |
#authorization ⇒ Object
Returns the value of attribute authorization.
364 365 366 |
# File 'lib/egalite.rb', line 364 def @authorization end |
#controller ⇒ Object
Returns the value of attribute controller.
366 367 368 |
# File 'lib/egalite.rb', line 366 def controller @controller end |
#controller_class ⇒ Object
Returns the value of attribute controller_class.
367 368 369 |
# File 'lib/egalite.rb', line 367 def controller_class @controller_class end |
#cookies ⇒ Object
Returns the value of attribute cookies.
364 365 366 |
# File 'lib/egalite.rb', line 364 def @cookies end |
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
368 369 370 |
# File 'lib/egalite.rb', line 368 def handler @handler end |
#inner_path ⇒ Object
Returns the value of attribute inner_path.
367 368 369 |
# File 'lib/egalite.rb', line 367 def inner_path @inner_path end |
#language ⇒ Object
Returns the value of attribute language.
365 366 367 |
# File 'lib/egalite.rb', line 365 def language @language end |
#method ⇒ Object
Returns the value of attribute method.
365 366 367 |
# File 'lib/egalite.rb', line 365 def method @method end |
#params ⇒ Object
Returns the value of attribute params.
366 367 368 |
# File 'lib/egalite.rb', line 366 def params @params end |
#path_info ⇒ Object
Returns the value of attribute path_info.
366 367 368 |
# File 'lib/egalite.rb', line 366 def path_info @path_info end |
#path_params ⇒ Object
Returns the value of attribute path_params.
366 367 368 |
# File 'lib/egalite.rb', line 366 def path_params @path_params end |
#rack_request ⇒ Object (readonly)
Returns the value of attribute rack_request.
368 369 370 |
# File 'lib/egalite.rb', line 368 def rack_request @rack_request end |
#route ⇒ Object
Returns the value of attribute route.
366 367 368 |
# File 'lib/egalite.rb', line 366 def route @route end |
#session ⇒ Object
Returns the value of attribute session.
364 365 366 |
# File 'lib/egalite.rb', line 364 def session @session end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
368 369 370 |
# File 'lib/egalite.rb', line 368 def time @time end |
Instance Method Details
#accept_language ⇒ Object
377 378 379 |
# File 'lib/egalite.rb', line 377 def accept_language @rack_env['HTTP_ACCEPT_LANGUAGE'] end |
#host ⇒ Object
386 387 388 |
# File 'lib/egalite.rb', line 386 def host @rack_request.host end |
#ipaddr ⇒ Object
389 390 391 |
# File 'lib/egalite.rb', line 389 def ipaddr @rack_request.ip end |
#path ⇒ Object
392 393 394 |
# File 'lib/egalite.rb', line 392 def path @rack_request.path end |
#port ⇒ Object
383 384 385 |
# File 'lib/egalite.rb', line 383 def port @rack_request.port end |
#referrer ⇒ Object
398 399 400 |
# File 'lib/egalite.rb', line 398 def referrer @rack_request.referrer end |
#scheme ⇒ Object
380 381 382 |
# File 'lib/egalite.rb', line 380 def scheme @rack_request.scheme end |
#url ⇒ Object
395 396 397 |
# File 'lib/egalite.rb', line 395 def url @rack_request.url end |