Class: Redbreast::IO::Config
- Inherits:
-
Object
- Object
- Redbreast::IO::Config
- Defined in:
- lib/redbreast/io/config.rb
Overview
Used for reading and writing to config file
Constant Summary collapse
- CONFIG_FILE_PATH =
"#{Dir.pwd}/.redbreast.yml"
Class Method Summary collapse
Class Method Details
.read ⇒ Object
12 13 14 |
# File 'lib/redbreast/io/config.rb', line 12 def read YAML.load_file(CONFIG_FILE_PATH) end |
.write(data) ⇒ Object
8 9 10 |
# File 'lib/redbreast/io/config.rb', line 8 def write(data) File.open(CONFIG_FILE_PATH, 'w') { |file| YAML.dump(data, file) } end |