Class: HabitatSupervisor::Client

Inherits:
Object
  • Object
show all
Includes:
Butterfly, Census, Services, Configurable, Connection
Defined in:
lib/habitat_supervisor/client.rb,
lib/habitat_supervisor/client/census.rb,
lib/habitat_supervisor/client/services.rb,
lib/habitat_supervisor/client/butterfly.rb

Defined Under Namespace

Modules: Butterfly, Census, Services

Instance Attribute Summary

Attributes included from Configurable

#api_endpoint

Instance Method Summary collapse

Methods included from Services

#service, #service_config, #service_health, #services

Methods included from Census

#census

Methods included from Butterfly

#butterfly

Methods included from Connection

#get, #http, #url

Methods included from Configurable

#configure, keys, #reset!

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



15
16
17
18
19
20
# File 'lib/habitat_supervisor/client.rb', line 15

def initialize(options = {})
  # Use options passed in, but fall back to module defaults
  HabitatSupervisor::Configurable.keys.each do |key|
    instance_variable_set(:"@#{key}", options[key] || HabitatSupervisor.instance_variable_get(:"@#{key}"))
  end
end