Module: Halo::Configuration

Included in:
Halo
Defined in:
lib/halo-api/configuration.rb

Constant Summary collapse

OPTIONS =
%i[api_key region redis ttl].freeze
DEFAULT_API_KEY =
nil
DEFAULT_REGION =
'en'.freeze
DEFAULT_REDIS =
'redis://localhost:6379'.freeze
DEFAULT_TTL =

30m

1800

Instance Method Summary collapse

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



13
14
15
# File 'lib/halo-api/configuration.rb', line 13

def configure
  yield self
end

#optionsObject



17
18
19
20
21
# File 'lib/halo-api/configuration.rb', line 17

def options
  OPTIONS.inject({}) do |option, key|
    option.merge!(key => send(key))
  end
end