class HamlLint::Adapter::Haml4

Adapts the Haml::Parser from Haml 4 for use in HamlLint :reek: UncommunicativeModuleName

Attributes

parser[R]

The Haml parser to adapt for HamlLint

@api private @return [Haml::Parser] the Haml 4 parser

Public Class Methods

new(source, options = Haml::Options.new) click to toggle source

Parses the specified Haml code into an abstract syntax tree

@example

HamlLint::Adapter::Haml4.new('%div')

@api public @param source [String] Haml code to parse @param options [Haml::Options]

# File lib/haml_lint/adapter/haml_4.rb, line 17
def initialize(source, options = Haml::Options.new)
  @parser = Haml::Parser.new(source, options)
end