Method: SOCMaker::Conf.instance
- Defined in:
- lib/soc_maker/conf.rb
.instance ⇒ Object
Method to access the singleton instance: Within the first call, this method tries to load the config from the file. If the file doesn exist, a new instance is created.
- return
-
the config instance
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/soc_maker/conf.rb', line 76 def Conf.instance if @@inst == nil if File.file?( @@conf_file_path ) @@inst = YAML::load_file( @@conf_file_path ) else @@inst = new end end return @@inst end |