Class: ContainersManager::Configuration
- Inherits:
-
Object
- Object
- ContainersManager::Configuration
- Defined in:
- lib/containers_manager/configuration.rb
Class Method Summary collapse
Class Method Details
.check ⇒ Object
12 13 14 15 |
# File 'lib/containers_manager/configuration.rb', line 12 def self.check $stdout.puts(@data.inspect) $stdout.puts("OK") end |
.load(file_path) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/containers_manager/configuration.rb', line 5 def self.load(file_path) raise "#{file_path} cannot be found" unless File.exists?(file_path) @file_path = file_path @data = YAML.load_file(file_path) end |
.method_missing(method_name, *args, &block) ⇒ Object
19 20 21 22 23 |
# File 'lib/containers_manager/configuration.rb', line 19 def self.method_missing(method_name, *args, &block) value = @data[method_name.to_s] raise "Attribute '#{method_name}' cannot be found in the #{@file_path}" unless value value end |