Sha256: f3ad3768ffc824a33664b18d13cc813eaff1e793bf76e76d902b34ad5d52196a
Contents?: true
Size: 711 Bytes
Versions: 16
Compression:
Stored size: 711 Bytes
Contents
module RubySlippers module Engine module Template def to_html page, config, &blk path = ([:layout, :repo].include?(page) ? Paths[:templates] : Paths[:pages]) config[:to_html].call(path, page, binding) end def markdown text if (options = @config[:markdown]) Markdown.new(text.to_s.strip, *(options.eql?(true) ? [] : options)).to_html else text.strip end end def method_missing m, *args, &blk self.keys.include?(m) ? self[m] : super end def self.included obj obj.class_eval do define_method(obj.to_s.split('::').last.downcase) { self } end end end end end
Version data entries
16 entries across 16 versions & 2 rubygems