Class: Barabara::GlobalConfig

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

Overview

Make configuration accessible as a Singleton object.

Class Method Summary collapse

Class Method Details

.configObject



103
104
105
# File 'lib/barabara/config.rb', line 103

def config
  @config ||= Configuration.new(@path)
end

.init(path) ⇒ Object



98
99
100
101
# File 'lib/barabara/config.rb', line 98

def init(path)
  @path = File.expand_path(path)
  @config = Configuration.new(@path)
end