Module: VDF
- Defined in:
- lib/vdf.rb,
lib/vdf/parse.rb,
lib/vdf/version.rb,
lib/vdf/generate.rb
Overview
Main VDF module
Defined Under Namespace
Classes: Generator, Parser, ParserError
Constant Summary collapse
- VERSION =
The current version
'1.0.5'
Class Method Summary collapse
-
.generate(object) ⇒ String
Generates a VDF document from a ruby hash.
-
.parse(input) ⇒ Hash
Parses a VDF document into a Ruby Hash and returns it.
Class Method Details
.generate(object) ⇒ String
Generates a VDF document from a ruby hash.
42 43 44 |
# File 'lib/vdf/generate.rb', line 42 def generate(object) Generator.generate(object) end |
.parse(input) ⇒ Hash
Parses a VDF document into a Ruby Hash and returns it
For large files, it’s recommended to pass the File object to VDF.parse instead of reading the whole File contents into memory
135 136 137 |
# File 'lib/vdf/parse.rb', line 135 def parse(input) Parser.parse(input) end |