Class: ConfigSL::FileFormat::Toml

Inherits:
Base
  • Object
show all
Defined in:
lib/configsl/file_format/toml.rb

Overview

Support for TOML files.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extensionsObject



10
11
12
# File 'lib/configsl/file_format/toml.rb', line 10

def self.extensions
  %i[toml]
end

Instance Method Details

#readObject



14
15
16
17
18
# File 'lib/configsl/file_format/toml.rb', line 14

def read
  TomlRB.load_file(@file, symbolize_keys: true).each do |name, value|
    yield name, value if block_given?
  end
end