class Rigit::Config
Handles the rig config file. Usage example:
Config.load 'path/to.yml'
Attributes
path[R]
Public Class Methods
load(path)
click to toggle source
Returns a new configatron
instance, after loading from a YAML file.
# File lib/rigit/config.rb, line 14 def self.load(path) new(path).settings end
new(path)
click to toggle source
# File lib/rigit/config.rb, line 18 def initialize(path) @path = path end
Public Instance Methods
settings()
click to toggle source
# File lib/rigit/config.rb, line 22 def settings @settings ||= settings! end
settings!()
click to toggle source
# File lib/rigit/config.rb, line 26 def settings! settings = Configatron::RootStore.new settings.configure_from_hash YAML.load_file(path) if File.exist? path settings end