Class: Saikuro::ParseStateFormater

Inherits:
BaseFormater show all
Defined in:
lib/saikuro/parse_state_formater.rb

Direct Known Subclasses

StateHTMLComplexityFormater

Instance Attribute Summary

Attributes inherited from BaseFormater

#current, #errors, #warnings

Instance Method Summary collapse

Methods inherited from BaseFormater

#initialize, #reset_data, #warn_error?

Constructor Details

This class inherits a constructor from Saikuro::BaseFormater

Instance Method Details

#def_compute_state(name, complexity, lines) ⇒ Object



22
23
24
25
26
# File 'lib/saikuro/parse_state_formater.rb', line 22

def def_compute_state(name,complexity,lines)
  return if @filter.ignore?(complexity)
  warn_error?(complexity, name)
  @out.puts "Type:Def Name:#{name} Complexity:#{complexity} Lines:#{lines}"
end

#endObject



9
10
# File 'lib/saikuro/parse_state_formater.rb', line 9

def end
end

#end_class_compute_state(name) ⇒ Object



18
19
20
# File 'lib/saikuro/parse_state_formater.rb', line 18

def end_class_compute_state(name)
  @out.puts "-- END #{name} --"
end

#start(new_out = nil) ⇒ Object



4
5
6
7
# File 'lib/saikuro/parse_state_formater.rb', line 4

def start(new_out=nil)
  reset_data
  @out = new_out if new_out
end

#start_class_compute_state(type_name, name, complexity, lines) ⇒ Object



12
13
14
15
16
# File 'lib/saikuro/parse_state_formater.rb', line 12

def start_class_compute_state(type_name,name,complexity,lines)
  @current = name
  @out.puts "-- START #{name} --"
  @out.puts "Type:#{type_name} Name:#{name} Complexity:#{complexity} Lines:#{lines}"
end