Sha256: de2a3b0baab7822e6cff07b943d3e9825dc94d05ac0dfa75ab44d99483748ac6
Contents?: true
Size: 608 Bytes
Versions: 13
Compression:
Stored size: 608 Bytes
Contents
module Flutterby class Exporter def initialize(root) @root = root end def export!(into:) @root.paths.each do |path, node| if node.should_publish? path = ::File.expand_path(::File.join(into, node.url)) if node.file? # Make sure directory exists FileUtils.mkdir_p(::File.dirname(path)) # Write file ::File.write(path, node.render) logger.info "Exported #{node.url}" end end end end private def logger @logger ||= Flutterby.logger end end end
Version data entries
13 entries across 13 versions & 1 rubygems