Class: LinterReport

Inherits:
Object
  • Object
show all
Defined in:
lib/tasks/helpers/linter_report.rb

Direct Known Subclasses

ValeLinterReport

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_output) ⇒ LinterReport

Returns a new instance of LinterReport.



4
5
6
7
# File 'lib/tasks/helpers/linter_report.rb', line 4

def initialize(raw_output)
  puts "#{self.class} initialized."
  @linter_raw_output = raw_output
end

Instance Attribute Details

#linter_full_reportObject

Returns the value of attribute linter_full_report.



2
3
4
# File 'lib/tasks/helpers/linter_report.rb', line 2

def linter_full_report
  @linter_full_report
end

#linter_raw_outputObject

Returns the value of attribute linter_raw_output.



2
3
4
# File 'lib/tasks/helpers/linter_report.rb', line 2

def linter_raw_output
  @linter_raw_output
end

#linter_summary_reportObject

Returns the value of attribute linter_summary_report.



2
3
4
# File 'lib/tasks/helpers/linter_report.rb', line 2

def linter_summary_report
  @linter_summary_report
end

Instance Method Details

#format_linter_outputObject

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/tasks/helpers/linter_report.rb', line 9

def format_linter_output
  raise NotImplementedError, "Subclass must implement #format_linter_output"
end

#get_linter_full_reportObject



33
34
35
36
37
# File 'lib/tasks/helpers/linter_report.rb', line 33

def get_linter_full_report
  raise "No output detail available.  Check you have called set_linter_full_report" unless @linter_full_report

  @linter_full_report
end

#get_linter_summary_reportObject



23
24
25
26
27
# File 'lib/tasks/helpers/linter_report.rb', line 23

def get_linter_summary_report
  raise "No output summary available.  Check you have called set_linter_summary_report" unless @linter_summary_report

  @linter_summary_report
end

#get_raw_outputObject



13
14
15
16
17
# File 'lib/tasks/helpers/linter_report.rb', line 13

def get_raw_output
  raise "No raw output available.  Check you have run the linter task correctly" unless @linter_raw_output

  @linter_raw_output
end

#set_linter_full_reportObject



29
30
31
# File 'lib/tasks/helpers/linter_report.rb', line 29

def set_linter_full_report
  raise "Subclass must implement #set_linter_full_report"
end

#set_linter_summary_reportObject



19
20
21
# File 'lib/tasks/helpers/linter_report.rb', line 19

def set_linter_summary_report
  raise "Subclass must implement #set_linter_summary_report"
end