Class: OmniAI::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/omniai/config.rb

Overview

A configuration for each agent w/ ‘api_key` / `host` / `logger`.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



6
7
8
# File 'lib/omniai/config.rb', line 6

def api_key
  @api_key
end

#hostObject

Returns the value of attribute host.



6
7
8
# File 'lib/omniai/config.rb', line 6

def host
  @host
end

#loggerObject

Returns the value of attribute logger.



6
7
8
# File 'lib/omniai/config.rb', line 6

def logger
  @logger
end

Instance Method Details

#inspectString

Returns:

  • (String)


9
10
11
12
# File 'lib/omniai/config.rb', line 9

def inspect
  masked_api_key = "#{api_key[..2]}***" if api_key
  "#<#{self.class.name} api_key=#{masked_api_key.inspect} host=#{host.inspect}>"
end