Class: Client

Inherits:
Object
  • Object
show all
Defined in:
lib/client/version.rb,
lib/client.rb

Defined Under Namespace

Classes: Base

Constant Summary collapse

VERSION =
'0.1.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.loaded_config_filesObject

Returns the value of attribute loaded_config_files.



103
104
105
# File 'lib/client.rb', line 103

def loaded_config_files
  @loaded_config_files
end

.loggerObject

Returns the value of attribute logger.



103
104
105
# File 'lib/client.rb', line 103

def logger
  @logger
end

Class Method Details

.clientsObject



109
110
111
# File 'lib/client.rb', line 109

def clients
  @clients ||= {}
end

.load_clients(path = default_config_path) ⇒ Object



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/client.rb', line 116

def load_clients(path = default_config_path)
  begin
    clients.merge! YAML.load_file(path)
    loaded_config_files << path
  rescue
    warn """Check that you have an file in:  \n\t
    #{path}

that respects the following format:  \n\t
  example:
    base_uri: http://example.com/api/v3/
    """
    {}
  end
  generate_clients
end