Class: Haml::Compiler::TagCompiler
- Inherits:
-
Object
- Object
- Haml::Compiler::TagCompiler
- Defined in:
- lib/haml/compiler/tag_compiler.rb
Instance Method Summary collapse
- #compile(node, &block) ⇒ Object
-
#initialize(identity, options) ⇒ TagCompiler
constructor
A new instance of TagCompiler.
Constructor Details
#initialize(identity, options) ⇒ TagCompiler
Returns a new instance of TagCompiler.
9 10 11 12 13 |
# File 'lib/haml/compiler/tag_compiler.rb', line 9 def initialize(identity, ) @autoclose = [:autoclose] @identity = identity @attribute_compiler = AttributeCompiler.new(identity, ) end |
Instance Method Details
#compile(node, &block) ⇒ Object
15 16 17 18 19 |
# File 'lib/haml/compiler/tag_compiler.rb', line 15 def compile(node, &block) attrs = @attribute_compiler.compile(node) contents = compile_contents(node, &block) [:html, :tag, node.value[:name], attrs, contents] end |