class Slideshift::Tool::Presentation
Public Class Methods
new(dir = ".", static = '/static')
click to toggle source
# File lib/slideshift/tool/presentation.rb, line 7 def initialize(dir = ".", static = '/static') @dir = dir @static = static @render = Render::Markdown.new(@dir) end
Public Instance Methods
load()
click to toggle source
# File lib/slideshift/tool/presentation.rb, line 17 def load template = File.read(File.expand_path("../template.erb", __FILE__)) template = File.read("#{@dir}/template.erb") if File.exists?("#{@dir}/template.erb") @template = ERB.new(template) @render.load end
render()
click to toggle source
# File lib/slideshift/tool/presentation.rb, line 24 def render @template.result(binding) end
static(file)
click to toggle source
# File lib/slideshift/tool/presentation.rb, line 13 def static(file) File.join(@static, file) end
Protected Instance Methods
presentation()
click to toggle source
# File lib/slideshift/tool/presentation.rb, line 30 def presentation @render.render end