Helpers.content()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
1
# This is a helper that inserts a markdown document from the content/
2
# directory into a page. Like such:
3
#
4
# = content :faq
5
#
6
# For an example, check out views/faq.haml.
7
module Haml::Helpers
8
  def content(template, *args)
9
    file = "content/#{template.to_s}.md"
10
    doc = Maruku.new(File.read(file))
11
    return doc.to_html
12
  end
13
end
14