Class: Txbr::Template
- Inherits:
-
Object
- Object
- Txbr::Template
- Defined in:
- lib/txbr/template.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#liquid_template ⇒ Object
readonly
Returns the value of attribute liquid_template.
Instance Method Summary collapse
- #each_content_tag ⇒ Object
-
#initialize(id, liquid_template) ⇒ Template
constructor
A new instance of Template.
Constructor Details
#initialize(id, liquid_template) ⇒ Template
Returns a new instance of Template.
5 6 7 8 |
# File 'lib/txbr/template.rb', line 5 def initialize(id, liquid_template) @id = id @liquid_template = liquid_template end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/txbr/template.rb', line 3 def id @id end |
#liquid_template ⇒ Object (readonly)
Returns the value of attribute liquid_template.
3 4 5 |
# File 'lib/txbr/template.rb', line 3 def liquid_template @liquid_template end |
Instance Method Details
#each_content_tag ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/txbr/template.rb', line 10 def each_content_tag return to_enum(__method__) unless block_given? .each do |content_tag| next unless translation_enabled? yield content_tag end end |