Sha256: ac1ef09fc397dffbdea93ad613dd90ec3c21529aa0eb3ece836b9d657f63b3db
Contents?: true
Size: 513 Bytes
Versions: 4
Compression:
Stored size: 513 Bytes
Contents
# frozen_string_literal: true require 'active_support/core_ext/hash/keys' require 'toml' class Time def to_toml(_path = '') utc.strftime('%Y-%m-%dT%H:%M:%SZ') end end class Date def to_toml(_path = '') strftime('%Y-%m-%d') end end module Agave module Dump module Format module Toml def self.dump(value) TOML::Generator.new(value).body end def self.frontmatter_dump(value) "+++\n#{dump(value)}+++" end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems