Class: HamlLint::Adapter::Haml4

Inherits:
HamlLint::Adapter show all
Extended by:
Forwardable
Defined in:
lib/haml_lint/adapter/haml_4.rb

Overview

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

Instance Method Summary collapse

Methods inherited from HamlLint::Adapter

detect_class

Constructor Details

#initialize(source, options = Haml::Options.new) ⇒ Haml4

Parses the specified Haml code into an abstract syntax tree

Examples:

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

Parameters:

  • source (String)

    Haml code to parse

  • options (Haml::Options) (defaults to: Haml::Options.new)


18
19
20
# File 'lib/haml_lint/adapter/haml_4.rb', line 18

def initialize(source, options = Haml::Options.new)
  @parser = Haml::Parser.new(source, options)
end