Class: UmbrellioUtils::RequestWrapper

Inherits:
Object
  • Object
show all
Includes:
Memery
Defined in:
lib/umbrellio_utils/request_wrapper.rb

Instance Method Summary collapse

Constructor Details

#initialize(request, remove_xml_attributes: true) ⇒ RequestWrapper

Returns a new instance of RequestWrapper.



7
8
9
10
# File 'lib/umbrellio_utils/request_wrapper.rb', line 7

def initialize(request, remove_xml_attributes: true)
  self.request = request
  self.remove_xml_attributes = remove_xml_attributes
end

Instance Method Details

#[](key) ⇒ Object



21
22
23
# File 'lib/umbrellio_utils/request_wrapper.rb', line 21

def [](key)
  params[key]
end

#headersObject



45
46
47
# File 'lib/umbrellio_utils/request_wrapper.rb', line 45

def headers
  request.headers
end

#ipObject



49
50
51
# File 'lib/umbrellio_utils/request_wrapper.rb', line 49

def ip
  request.ip
end

#rails_paramsObject



25
26
27
# File 'lib/umbrellio_utils/request_wrapper.rb', line 25

def rails_params
  request.params
end

#raw_requestObject



29
30
31
# File 'lib/umbrellio_utils/request_wrapper.rb', line 29

def raw_request
  request
end