Class: Utils::ProbeClient::EnvProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/utils/probe_server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server) ⇒ EnvProxy

Returns a new instance of EnvProxy.



58
59
60
# File 'lib/utils/probe_server.rb', line 58

def initialize(server)
  @server = server
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



72
73
74
# File 'lib/utils/probe_server.rb', line 72

def env
  @env
end

Instance Method Details

#[](key) ⇒ Object



67
68
69
70
# File 'lib/utils/probe_server.rb', line 67

def [](key)
  response = @server.transmit_with_response(type: 'get_env', key:)
  response.env
end

#[]=(key, value) ⇒ Object



62
63
64
65
# File 'lib/utils/probe_server.rb', line 62

def []=(key, value)
  response = @server.transmit_with_response(type: 'set_env', key:, value:)
  response.env
end