Class: Client::Request
- Inherits:
-
Object
- Object
- Client::Request
- Defined in:
- lib/client_variable/request.rb
Class Method Summary collapse
- .clear ⇒ Object
- .env ⇒ Object
- .env=(environment) ⇒ Object
- .id ⇒ Object
- .id=(request_id) ⇒ Object
- .values ⇒ Object
Class Method Details
.clear ⇒ Object
25 26 27 |
# File 'lib/client_variable/request.rb', line 25 def clear env && (env['client'] = {}) end |
.env ⇒ Object
4 5 6 |
# File 'lib/client_variable/request.rb', line 4 def env @request_env if defined? @request_env end |
.env=(environment) ⇒ Object
8 9 10 11 |
# File 'lib/client_variable/request.rb', line 8 def env=(environment) @request_env = environment @request_env['client'] ||= {} end |
.id ⇒ Object
13 14 15 |
# File 'lib/client_variable/request.rb', line 13 def id @request_id if defined? @request_id end |
.id=(request_id) ⇒ Object
17 18 19 |
# File 'lib/client_variable/request.rb', line 17 def id=(request_id) @request_id = request_id end |
.values ⇒ Object
21 22 23 |
# File 'lib/client_variable/request.rb', line 21 def values env.blank? ? {} : env['client'] end |