Class: HamlLint::Directive::Null

Inherits:
HamlLint::Directive show all
Defined in:
lib/haml_lint/directive.rb

Overview

A null representation of a directive.

Constant Summary

Constants inherited from HamlLint::Directive

DIRECTIVE_REGEXP, LINTER_REGEXP

Instance Attribute Summary

Attributes inherited from HamlLint::Directive

#mode

Instance Method Summary collapse

Methods inherited from HamlLint::Directive

#==, from_line

Constructor Details

#initialize(source, line) ⇒ Null

Instantiates a new null directive.

Parameters:

  • source (String)

    the source code to analyze

  • line (Integer)

    the line number the source starts at


96
97
98
99
# File 'lib/haml_lint/directive.rb', line 96

def initialize(source, line)
  @source = source
  @line = line
end

Instance Method Details

#disable?false

Stubs out the disable check as false.

Returns:

  • (false)

104
105
106
# File 'lib/haml_lint/directive.rb', line 104

def disable?
  false
end

#enable?false

Stubs out the ensable check as false.

Returns:

  • (false)

111
112
113
# File 'lib/haml_lint/directive.rb', line 111

def enable?
  false
end

#inspectString

Formats the null directive for display in a console.

Returns:

  • (String)

118
119
120
# File 'lib/haml_lint/directive.rb', line 118

def inspect
  '#<HamlLint::Directive::Null>'
end

#lintersArray

Stubs out the linters.

Returns:

  • (Array)

125
126
127
# File 'lib/haml_lint/directive.rb', line 125

def linters
  []
end