Module: MemoriClient

Defined in:
lib/memori_client.rb,
lib/memori_client/configuration.rb

Defined Under Namespace

Modules: Backend, Engine Classes: Configuration, HttpClient, Resource

Class Method Summary collapse

Class Method Details

.configurationObject

Instantiate the Configuration singleton or return it. Remember that the instance has attribute readers so that we can access the configured values



27
28
29
# File 'lib/memori_client.rb', line 27

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

This is the configure block definition. The configuration method will return the Configuration singleton, which is then yielded to the configure block. Then it’s just a matter of using the attribute accessors we previously defined

Yields:



36
37
38
# File 'lib/memori_client.rb', line 36

def configure
  yield(configuration)
end