Class: TTY::Config::Marshallers::TOMLMarshaller
- Inherits:
-
Object
- Object
- TTY::Config::Marshallers::TOMLMarshaller
- Includes:
- TTY::Config::Marshaller
- Defined in:
- lib/tty/config/marshallers/toml_marshaller.rb
Overview
Responsible for marshalling content from and into TOML format
Instance Method Summary collapse
Methods included from TTY::Config::Marshaller
Instance Method Details
#marshal(data) ⇒ Object
18 19 20 |
# File 'lib/tty/config/marshallers/toml_marshaller.rb', line 18 def marshal(data) TOML::Generator.new(data).body end |
#unmarshal(content) ⇒ Object
22 23 24 |
# File 'lib/tty/config/marshallers/toml_marshaller.rb', line 22 def unmarshal(content) TOML::Parser.new(content).parsed end |