Class: Seafoam::Config
- Inherits:
-
Object
- Object
- Seafoam::Config
- Defined in:
- lib/seafoam/config.rb
Overview
Finds and loads configuration.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
-
#load_config ⇒ Object
Load the configuration.
Constructor Details
#initialize ⇒ Config
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_config ⇒ Object
Load the configuration.
9 10 11 12 13 14 15 |
# File 'lib/seafoam/config.rb', line 9 def load_config config_file = File.('config', @dot_dir) if File.exist?(config_file) puts "loading config #{config_file}" if $DEBUG load config_file end end |