class HaveAPI::Fs::Components::HtmlHelpFile
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
HaveAPI::Fs::Components::HelpFile::new
# File lib/haveapi/fs/components/html_help_file.rb, line 3 def initialize(*args) super @layout = ERB.new(::File.open(template_path('layout')).read, 0, '-') @template = ERB.new( ::File.open(template_path(@c.class)).read, 0, '-' ) end
Public Instance Methods
read()
click to toggle source
# File lib/haveapi/fs/components/html_help_file.rb, line 13 def read layout(@layout) do @template.result(binding) end end
Protected Instance Methods
asset(path)
click to toggle source
# File lib/haveapi/fs/components/html_help_file.rb, line 20 def asset(path) ::File.join(@context.mountpoint, '.assets', path) end