Class: Rallycat::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/rallycat/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



3
4
5
6
7
8
9
10
# File 'lib/rallycat/config.rb', line 3

def initialize
  begin
    @config = YAML.load_file File.expand_path('~/.rallycatrc')
  rescue StandardError
    message = "Your rallycat config file is missing or invalid. See 'rallycat help'."
    raise InvalidConfigError.new message
  end
end

Instance Method Details

#[](key) ⇒ Object



12
13
14
# File 'lib/rallycat/config.rb', line 12

def [](key)
  @config[key]
end