Module: MultiToml
Defined Under Namespace
Classes: NoParserError
Constant Summary collapse
- PARSER_MAP =
{ :toml => lambda { |toml| TOML::Parser.new(toml).parsed }, :toml_ruby => lambda { |toml| Toml.load(toml) }, :toml2 => lambda { |toml| TOML.load(toml) } }
Instance Method Summary collapse
Instance Method Details
#adapter ⇒ Object
19 20 21 22 |
# File 'lib/multi_toml.rb', line 19 def adapter return @adapter if defined?(@adapter) @adapter = detect_adapter end |
#adapter=(adapter) ⇒ Object
24 25 26 |
# File 'lib/multi_toml.rb', line 24 def adapter=(adapter) @adapter = adapter end |
#load(input) ⇒ Object
15 16 17 |
# File 'lib/multi_toml.rb', line 15 def load(input) parser.call(input) end |