Class: Solis::ConfigFile
- Inherits:
-
Object
- Object
- Solis::ConfigFile
- Defined in:
- lib/solis/config_file.rb
Class Method Summary collapse
- .[](key) ⇒ Object
- .[]=(key, value) ⇒ Object
- .config ⇒ Object
- .include?(key) ⇒ Boolean
- .keys ⇒ Object
- .name ⇒ Object
- .name=(config_file_name) ⇒ Object
- .path ⇒ Object
- .path=(config_file_path) ⇒ Object
- .version ⇒ Object
Class Method Details
.[](key) ⇒ Object
31 32 33 34 |
# File 'lib/solis/config_file.rb', line 31 def self.[](key) init @config[key] end |
.[]=(key, value) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/solis/config_file.rb', line 36 def self.[]=(key,value) init @config[key] = value File.open("#{path}/#{name}", 'w') do |f| f.puts @config.to_yaml end end |
.config ⇒ Object
49 50 51 52 |
# File 'lib/solis/config_file.rb', line 49 def self.config init @config end |
.include?(key) ⇒ Boolean
44 45 46 47 |
# File 'lib/solis/config_file.rb', line 44 def self.include?(key) init @config.include?(key) end |
.keys ⇒ Object
54 55 56 57 |
# File 'lib/solis/config_file.rb', line 54 def self.keys init @config.keys end |
.name ⇒ Object
15 16 17 |
# File 'lib/solis/config_file.rb', line 15 def self.name @config_file_name end |
.name=(config_file_name) ⇒ Object
19 20 21 |
# File 'lib/solis/config_file.rb', line 19 def self.name=(config_file_name) @config_file_name = config_file_name end |
.path ⇒ Object
23 24 25 |
# File 'lib/solis/config_file.rb', line 23 def self.path @config_file_path end |
.path=(config_file_path) ⇒ Object
27 28 29 |
# File 'lib/solis/config_file.rb', line 27 def self.path=(config_file_path) @config_file_path = File.absolute_path(config_file_path) end |
.version ⇒ Object
11 12 13 |
# File 'lib/solis/config_file.rb', line 11 def self.version "0.0.4" end |