Class: Egalite::Request

Inherits:
Object show all
Defined in:
lib/egalite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionObject

Returns the value of attribute action.



366
367
368
# File 'lib/egalite.rb', line 366

def action
  @action
end

#action_methodObject

Returns the value of attribute action_method.



367
368
369
# File 'lib/egalite.rb', line 367

def action_method
  @action_method
end

#authorizationObject

Returns the value of attribute authorization.



364
365
366
# File 'lib/egalite.rb', line 364

def authorization
  @authorization
end

#controllerObject

Returns the value of attribute controller.



366
367
368
# File 'lib/egalite.rb', line 366

def controller
  @controller
end

#controller_classObject

Returns the value of attribute controller_class.



367
368
369
# File 'lib/egalite.rb', line 367

def controller_class
  @controller_class
end

#cookiesObject

Returns the value of attribute cookies.



364
365
366
# File 'lib/egalite.rb', line 364

def cookies
  @cookies
end

#handlerObject (readonly)

Returns the value of attribute handler.



368
369
370
# File 'lib/egalite.rb', line 368

def handler
  @handler
end

#inner_pathObject

Returns the value of attribute inner_path.



367
368
369
# File 'lib/egalite.rb', line 367

def inner_path
  @inner_path
end

#languageObject

Returns the value of attribute language.



365
366
367
# File 'lib/egalite.rb', line 365

def language
  @language
end

#methodObject

Returns the value of attribute method.



365
366
367
# File 'lib/egalite.rb', line 365

def method
  @method
end

#paramsObject

Returns the value of attribute params.



366
367
368
# File 'lib/egalite.rb', line 366

def params
  @params
end

#path_infoObject

Returns the value of attribute path_info.



366
367
368
# File 'lib/egalite.rb', line 366

def path_info
  @path_info
end

#path_paramsObject

Returns the value of attribute path_params.



366
367
368
# File 'lib/egalite.rb', line 366

def path_params
  @path_params
end

#rack_requestObject (readonly)

Returns the value of attribute rack_request.



368
369
370
# File 'lib/egalite.rb', line 368

def rack_request
  @rack_request
end

#routeObject

Returns the value of attribute route.



366
367
368
# File 'lib/egalite.rb', line 366

def route
  @route
end

#sessionObject

Returns the value of attribute session.



364
365
366
# File 'lib/egalite.rb', line 364

def session
  @session
end

#timeObject (readonly)

Returns the value of attribute time.



368
369
370
# File 'lib/egalite.rb', line 368

def time
  @time
end

Instance Method Details

#accept_languageObject



377
378
379
# File 'lib/egalite.rb', line 377

def accept_language
  @rack_env['HTTP_ACCEPT_LANGUAGE']
end

#hostObject



386
387
388
# File 'lib/egalite.rb', line 386

def host
  @rack_request.host
end

#ipaddrObject



389
390
391
# File 'lib/egalite.rb', line 389

def ipaddr
  @rack_request.ip
end

#pathObject



392
393
394
# File 'lib/egalite.rb', line 392

def path
  @rack_request.path
end

#portObject



383
384
385
# File 'lib/egalite.rb', line 383

def port
  @rack_request.port
end

#referrerObject



398
399
400
# File 'lib/egalite.rb', line 398

def referrer
  @rack_request.referrer
end

#schemeObject



380
381
382
# File 'lib/egalite.rb', line 380

def scheme
  @rack_request.scheme
end

#urlObject



395
396
397
# File 'lib/egalite.rb', line 395

def url
  @rack_request.url
end