module Dato::Dump::Format
Public Class Methods
converter_for(format)
click to toggle source
# File lib/dato/dump/format.rb, line 18 def self.converter_for(format) case format.to_sym when :toml Format::Toml when :yaml, :yml Format::Yaml when :json Format::Json end end
dump(format, value)
click to toggle source
# File lib/dato/dump/format.rb, line 10 def self.dump(format, value) converter_for(format).dump(value) end
frontmatter_dump(format, value)
click to toggle source
# File lib/dato/dump/format.rb, line 14 def self.frontmatter_dump(format, value) converter_for(format).frontmatter_dump(value) end