Class: ERBLint::Reporter
- Inherits:
-
Object
show all
- Defined in:
- lib/erb_lint/reporter.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(stats, autocorrect) ⇒ Reporter
Returns a new instance of Reporter.
25
26
27
28
|
# File 'lib/erb_lint/reporter.rb', line 25
def initialize(stats, autocorrect)
@stats = stats
@autocorrect = autocorrect
end
|
Class Method Details
12
13
14
|
# File 'lib/erb_lint/reporter.rb', line 12
def self.available_format?(format)
available_formats.include?(format.to_s)
end
|
16
17
18
19
20
21
22
23
|
# File 'lib/erb_lint/reporter.rb', line 16
def self.available_formats
descendants
.map(&:to_s)
.map(&:demodulize)
.map(&:underscore)
.map { |klass_name| klass_name.sub("_reporter", "") }
.sort
end
|
.create_reporter(format, *args) ⇒ Object
7
8
9
10
|
# File 'lib/erb_lint/reporter.rb', line 7
def self.create_reporter(format, *args)
reporter_klass = "#{ERBLint::Reporters}::#{format.to_s.camelize}Reporter".constantize
reporter_klass.new(*args)
end
|
Instance Method Details
#preview ⇒ Object
30
|
# File 'lib/erb_lint/reporter.rb', line 30
def preview; end
|
#show ⇒ Object
32
|
# File 'lib/erb_lint/reporter.rb', line 32
def show; end
|