Class: HamlLint::Adapter::Haml5
- Inherits:
-
HamlLint::Adapter
- Object
- HamlLint::Adapter
- HamlLint::Adapter::Haml5
- Defined in:
- lib/haml_lint/adapter/haml_5.rb
Overview
Adapts the Haml::Parser from Haml 5 for use in HamlLint :reek:UncommunicativeModuleName
Instance Method Summary collapse
-
#initialize(source, options = Haml::Options.new) ⇒ Haml5
constructor
Parses the specified Haml code into an abstract syntax tree.
-
#parse ⇒ Haml::Parser::ParseNode
Parses the source code into an abstract syntax tree.
Methods inherited from HamlLint::Adapter
Constructor Details
#initialize(source, options = Haml::Options.new) ⇒ Haml5
Parses the specified Haml code into an abstract syntax tree
14 15 16 17 |
# File 'lib/haml_lint/adapter/haml_5.rb', line 14 def initialize(source, = Haml::Options.new) @source = source @parser = Haml::Parser.new() end |
Instance Method Details
#parse ⇒ Haml::Parser::ParseNode
Parses the source code into an abstract syntax tree
27 28 29 |
# File 'lib/haml_lint/adapter/haml_5.rb', line 27 def parse parser.call(source) end |