Class: Utils::ProbeServer::LogWrapper

Inherits:
BasicObject
Defined in:
lib/utils/probe_server.rb

Instance Method Summary collapse

Constructor Details

#initialize(server, object) ⇒ LogWrapper

Returns a new instance of LogWrapper.



143
144
145
# File 'lib/utils/probe_server.rb', line 143

def initialize(server, object)
  @server, @object = server, object
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*a, &b) ⇒ Object



153
154
155
# File 'lib/utils/probe_server.rb', line 153

def method_missing(*a, &b)
  @object.__send__(*a, &b)
end

Instance Method Details

#[]=(name, value) ⇒ Object



147
148
149
150
151
# File 'lib/utils/probe_server.rb', line 147

def []=(name, value)
  name, value = name.to_s, value.to_s
  @server.output_message("Setting #{name}=#{value.inspect}.", type: :info)
  @object[name] = value
end