Class: Hamloft::Template
- Inherits:
-
Object
- Object
- Hamloft::Template
- Defined in:
- lib/hamloft/template.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
-
#haml ⇒ Object
Returns the value of attribute haml.
-
#html ⇒ Object
Returns the value of attribute html.
Instance Method Summary collapse
- #chunks ⇒ Object
- #container {|block| ... } ⇒ Object
-
#initialize(haml, html) ⇒ Template
constructor
A new instance of Template.
- #process_chunk(_chunk) ⇒ Object
Constructor Details
#initialize(haml, html) ⇒ Template
Returns a new instance of Template.
5 6 7 8 9 |
# File 'lib/hamloft/template.rb', line 5 def initialize(haml, html) self.haml = haml self.html = html self.doc = Nokogiri::HTML.fragment(self.html) end |
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
3 4 5 |
# File 'lib/hamloft/template.rb', line 3 def doc @doc end |
#haml ⇒ Object
Returns the value of attribute haml.
3 4 5 |
# File 'lib/hamloft/template.rb', line 3 def haml @haml end |
#html ⇒ Object
Returns the value of attribute html.
3 4 5 |
# File 'lib/hamloft/template.rb', line 3 def html @html end |
Instance Method Details
#chunks ⇒ Object
11 12 13 |
# File 'lib/hamloft/template.rb', line 11 def chunks [] end |
#container {|block| ... } ⇒ Object
15 16 17 |
# File 'lib/hamloft/template.rb', line 15 def container(&block) yield(block) end |
#process_chunk(_chunk) ⇒ Object
19 20 21 |
# File 'lib/hamloft/template.rb', line 19 def process_chunk(_chunk) nil end |