Class: TomlRB::Dumper
- Inherits:
-
Object
- Object
- TomlRB::Dumper
- Defined in:
- lib/toml-rb/dumper.rb
Constant Summary collapse
- BASIC_ESCAPES =
TOML basic strings only allow these short escapes; every other control character must be written as \uXXXX (TOML 1.0.0 spec).
{ "\\" => "\\\\", "\"" => "\\\"", "\b" => "\\b", "\t" => "\\t", "\n" => "\\n", "\f" => "\\f", "\r" => "\\r" }.freeze
Instance Attribute Summary collapse
-
#toml_str ⇒ Object
readonly
Returns the value of attribute toml_str.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Dumper
constructor
A new instance of Dumper.
Constructor Details
#initialize(hash) ⇒ Dumper
Returns a new instance of Dumper.
21 22 23 24 25 |
# File 'lib/toml-rb/dumper.rb', line 21 def initialize(hash) @toml_str = "" visit(hash, []) end |
Instance Attribute Details
#toml_str ⇒ Object (readonly)
Returns the value of attribute toml_str.
19 20 21 |
# File 'lib/toml-rb/dumper.rb', line 19 def toml_str @toml_str end |