class Superbolt::Config

Attributes

app_name[W]
env[W]
options[R]

Public Class Methods

new(options={}) click to toggle source
# File lib/superbolt/config.rb, line 6
def initialize(options={})
  @options = options
end

Public Instance Methods

==(other) click to toggle source
# File lib/superbolt/config.rb, line 42
def ==(other)
  other.connection_params == connection_params &&
    other.env_connection_key == env_connection_key
end
app_name() click to toggle source
# File lib/superbolt/config.rb, line 10
def app_name
  @app_name ||= options[:app_name]
end
connection_params() click to toggle source
# File lib/superbolt/config.rb, line 18
def connection_params
  env_params || default
end
default() click to toggle source
# File lib/superbolt/config.rb, line 38
def default
  options[:connection_params] || {host: '127.0.0.1'}
end
env() click to toggle source
# File lib/superbolt/config.rb, line 14
def env
  @env ||= options[:env]
end
env_connection_key() click to toggle source
# File lib/superbolt/config.rb, line 22
def env_connection_key
  options[:connection_key] || 'RABBITMQ_URL'
end
env_params() click to toggle source
# File lib/superbolt/config.rb, line 34
def env_params
  ENV[env_connection_key]
end
error_notifier() click to toggle source
# File lib/superbolt/config.rb, line 30
def error_notifier
  options[:error_notifier]
end
runner() click to toggle source
# File lib/superbolt/config.rb, line 26
def runner
  options[:runner]
end