Module: SabyVok

Defined in:
lib/saby_vok.rb,
lib/saby_vok/auth.rb,
lib/saby_vok/http.rb,
lib/saby_vok/client.rb,
lib/saby_vok/errors.rb,
lib/saby_vok/version.rb

Defined Under Namespace

Classes: Auth, AuthError, Client, Config, Error, Http, HttpError, ParsingError, ValidationError

Constant Summary collapse

VERSION =
"0.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.clientSabyVok::Client?

Returns:



28
29
30
31
32
# File 'lib/saby_vok.rb', line 28

def client
  mutex.synchronize do
    @client ||= build_client_from_config
  end
end

Class Method Details

.configConfig

Returns:



52
53
54
# File 'lib/saby_vok.rb', line 52

def config
  @config ||= Config.new
end

.configure {|Config| ... } ⇒ void

This method returns an undefined value.

Yields:



36
37
38
39
40
# File 'lib/saby_vok.rb', line 36

def configure
  mutex.synchronize do
    yield(config)
  end
end

.reset_client!void

This method returns an undefined value.

Drops the memoized client so the next call to #client rebuilds it with updated config.



45
46
47
48
49
# File 'lib/saby_vok.rb', line 45

def reset_client!
  mutex.synchronize do
    @client = nil
  end
end