Class: LintTrap::Language::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/lint_trap/language/base.rb

Overview

Interface for languages

Direct Known Subclasses

CPP, CSS, CoffeeScript, Go, JSON, Java, JavaScript, Python, Ruby, SCSS

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



13
14
15
# File 'lib/lint_trap/language/base.rb', line 13

def ==(other)
  name == other.name
end

#lintersObject

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/lint_trap/language/base.rb', line 9

def linters
  raise NotImplementedError, 'Must define what linters this language supports.'
end

#nameObject



5
6
7
# File 'lib/lint_trap/language/base.rb', line 5

def name
  self.class.name.split('::').last
end