Class: Seafoam::Config

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

Overview

Finds and loads configuration.

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



4
5
6
# File 'lib/seafoam/config.rb', line 4

def initialize
  @dot_dir = find_dot_dir
end

Instance Method Details

#load_configObject

Load the configuration.



9
10
11
12
13
14
15
# File 'lib/seafoam/config.rb', line 9

def load_config
  config_file = File.expand_path('config', @dot_dir)
  if File.exist?(config_file)
    puts "loading config #{config_file}" if $DEBUG
    load config_file
  end
end