Class: DataCollector::ConfigFile
- Inherits:
-
Object
- Object
- DataCollector::ConfigFile
- Defined in:
- lib/data_collector/config_file.rb
Class Method Summary collapse
- .[](key) ⇒ Object
- .[]=(key, value) ⇒ 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
32 33 34 35 |
# File 'lib/data_collector/config_file.rb', line 32 def self.[](key) init @config[key] end |
.[]=(key, value) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/data_collector/config_file.rb', line 37 def self.[]=(key, value) init @config[key] = value File.open("#{path}/#{@config_file_name}", 'w') do |f| f.puts @config.to_yaml end end |
.include?(key) ⇒ Boolean
45 46 47 48 |
# File 'lib/data_collector/config_file.rb', line 45 def self.include?(key) init @config.include?(key) end |
.keys ⇒ Object
50 51 52 53 |
# File 'lib/data_collector/config_file.rb', line 50 def self.keys init @config.keys end |
.name ⇒ Object
16 17 18 |
# File 'lib/data_collector/config_file.rb', line 16 def self.name @config_file_name end |
.name=(config_file_name) ⇒ Object
20 21 22 |
# File 'lib/data_collector/config_file.rb', line 20 def self.name=(config_file_name) @config_file_name = config_file_name end |
.path ⇒ Object
24 25 26 |
# File 'lib/data_collector/config_file.rb', line 24 def self.path @config_file_path end |
.path=(config_file_path) ⇒ Object
28 29 30 |
# File 'lib/data_collector/config_file.rb', line 28 def self.path=(config_file_path) @config_file_path = config_file_path end |
.version ⇒ Object
12 13 14 |
# File 'lib/data_collector/config_file.rb', line 12 def self.version '0.0.3' end |