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



94
95
96
97
# File 'lib/haml_lint/directive.rb', line 94

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

Instance Method Details

#disable?false

Stubs out the disable check as false.

Returns:

  • (false)


102
103
104
# File 'lib/haml_lint/directive.rb', line 102

def disable?
  false
end

#enable?false

Stubs out the ensable check as false.

Returns:

  • (false)


109
110
111
# File 'lib/haml_lint/directive.rb', line 109

def enable?
  false
end

#inspectString

Formats the null directive for display in a console.

Returns:

  • (String)


116
117
118
# File 'lib/haml_lint/directive.rb', line 116

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

#lintersArray

Stubs out the linters.

Returns:

  • (Array)


123
124
125
# File 'lib/haml_lint/directive.rb', line 123

def linters
  []
end