Class: Factbase::ToYAML
- Inherits:
-
Object
- Object
- Factbase::ToYAML
- Defined in:
- lib/factbase/to_yaml.rb
Overview
Factbase to YAML converter.
This class helps converting an entire Factbase to YAML format, for example:
require 'factbase/to_yaml' fb = Factbase.new puts Factbase::ToYAML.new(fb).yaml
- Author
Yegor Bugayenko (yegor256@gmail.com)
- Copyright
Copyright (c) 2024-2026 Yegor Bugayenko
- License
MIT
Instance Method Summary collapse
-
#initialize(fb, sorter = '_id') ⇒ ToYAML
constructor
Constructor.
-
#yaml ⇒ String
Convert the entire factbase into YAML.
Constructor Details
#initialize(fb, sorter = '_id') ⇒ ToYAML
Constructor.
23 24 25 26 |
# File 'lib/factbase/to_yaml.rb', line 23 def initialize(fb, sorter = '_id') @fb = fb @sorter = sorter end |