lib/static_site_builder/renderers/template_renderer.rb
# Reads the @template_filepath file and sets @html to its contents.
# The correct filepath is decided on based on wether or not the template is
# built into the gem or on the user's local filesystem.
Reads the @template_filepath file and sets @html to its contents.
The correct filepath is decided on based on wether or not the template is
built into the gem or on the user's local filesystem.
Reads the @template_filepath file and sets @html to its contents . The correct filepath is decided on based on wether or not the template is built into the gem or on the user ' s local filesystem .
def read_template
      path = @template_filepath
      if @gem_included_template
        relative_path = "../../#{@template_filepath}"
        path = File.expand_path(relative_path, File.dirname(__FILE__))
      end
      @html = File.read(path)
    end
def read_template path = @template_filepath if @gem_included_template relative_path = "../../#{@template_filepath}" path = File . expand_path ( relative_path , File . dirname ( __FILE__ ) ) end @html = File . read ( path ) end
Reads the @template_filepath file and sets @html to its contents.
Reads the @template_filepath file and sets @html to its contents .