Class: GitStats::StatsView::Template
- Inherits:
-
Object
- Object
- GitStats::StatsView::Template
- Defined in:
- lib/git_stats/stats_view/template.rb
Instance Method Summary collapse
-
#initialize(name, layout = nil) ⇒ Template
constructor
A new instance of Template.
- #render(data, params = {}) ⇒ Object
Constructor Details
Instance Method Details
#render(data, params = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/git_stats/stats_view/template.rb', line 12 def render(data, params = {}) if @layout @layout.render(data, active_page: params[:active_page] || @name, links: params[:links]) do @template.render(data, params) end else @template.render(data, params) end end |