Sha256: 835f1db816e7f6c4b6009e4a74432e1f7715c4a35f549a577467701228682b25

Contents?: true

Size: 543 Bytes

Versions: 18

Compression:

Stored size: 543 Bytes

Contents

# -*- encoding : utf-8 -*-
module GitStats
  module StatsView
    class Template
      def initialize(name, layout=nil)
        @name = name
        @layout = layout
        @template = Tilt.new("../../../../templates/#@name.haml".absolute_path)
      end

      def render(data, params={})
        if @layout
          @layout.render(data, :active_page => params[:active_page] || @name, :links => params[:links]) { @template.render(data, params) }
        else
          @template.render(data, params)
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
git_stats-1.0.17 lib/git_stats/stats_view/template.rb
git_stats-1.0.16 lib/git_stats/stats_view/template.rb
git_stats-1.0.15 lib/git_stats/stats_view/template.rb
git_stats-1.0.14 lib/git_stats/stats_view/template.rb
git_stats-1.0.13 lib/git_stats/stats_view/template.rb
git_stats-1.0.12 lib/git_stats/stats_view/template.rb
git_stats-1.0.11 lib/git_stats/stats_view/template.rb
git_stats-1.0.10 lib/git_stats/stats_view/template.rb
git_stats-1.0.9 lib/git_stats/stats_view/template.rb
git_stats-1.0.8 lib/git_stats/stats_view/template.rb
git_stats-1.0.7 lib/git_stats/stats_view/template.rb
git_stats-1.0.6 lib/git_stats/stats_view/template.rb
git_stats-1.0.5 lib/git_stats/stats_view/template.rb
git_stats-1.0.4 lib/git_stats/stats_view/template.rb
git_stats-1.0.3 lib/git_stats/stats_view/template.rb
git_stats-1.0.2 lib/git_stats/stats_view/template.rb
git_stats-1.0.1 lib/git_stats/stats_view/template.rb
git_stats-1.0.0 lib/git_stats/stats_view/template.rb