class Majek::JekyllPage
Public Class Methods
new(content, vars=nil)
click to toggle source
# File lib/majek/jekyll_page.rb, line 3 def initialize(content, vars=nil) @content = content @vars = vars || Hash.new end
Public Instance Methods
content()
click to toggle source
# File lib/majek/jekyll_page.rb, line 8 def content @content end
front_matter()
click to toggle source
# File lib/majek/jekyll_page.rb, line 12 def front_matter ['---', @vars.map { |k, v| "#{k}: #{v}" }, '---'].join("\n") end
render()
click to toggle source
# File lib/majek/jekyll_page.rb, line 16 def render [front_matter, '', content].join("\n") end