class Iatelier::Controllers::Ileaf
Public Instance Methods
call(params)
click to toggle source
# File lib/iatelier/controllers/ileaf.rb, line 10 def call(params) @storage_location = './storage/leaves' + request.path_info.to_s + '.md' puts @storage_location self.body = ::Kramdown::Document.new(::File.open(@storage_location, external_encoding: "UTF-8").read).to_html end
Private Instance Methods
checkfile!()
click to toggle source
# File lib/iatelier/controllers/ileaf.rb, line 17 def checkfile! @storage_location = Hanami.root.to_s + '/storage/leaves' + request.path_info.to_s + '.md' halt 404 if !::File.exists? @storage_location end