Class: Glass::Template
- Inherits:
-
ActionView::Base
- Object
- ActionView::Base
- Glass::Template
- Defined in:
- lib/glass/template.rb
Instance Attribute Summary collapse
-
#template_name ⇒ Object
Returns the value of attribute template_name.
-
#timeline_item ⇒ Object
Returns the value of attribute timeline_item.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Template
constructor
then your template name would be: “tweets/blue”.
- #render_self ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Template
then your template name would be: “tweets/blue”
23 24 25 26 27 |
# File 'lib/glass/template.rb', line 23 def initialize(opts={}) self.template_name = opts.delete(:template_name) || "simple" set_template_instance_variables(opts) super(glass_template_path) end |
Instance Attribute Details
#template_name ⇒ Object
Returns the value of attribute template_name.
5 6 7 |
# File 'lib/glass/template.rb', line 5 def template_name @template_name end |
#timeline_item ⇒ Object
Returns the value of attribute timeline_item.
5 6 7 |
# File 'lib/glass/template.rb', line 5 def timeline_item @timeline_item end |
Instance Method Details
#render_self ⇒ Object
28 29 30 |
# File 'lib/glass/template.rb', line 28 def render_self self.render template: self.template_name end |