Class: TokenCounterFormater
Instance Attribute Summary
Attributes inherited from BaseFormater
#current, #errors, #warnings
Instance Method Summary
collapse
#initialize, #reset_data, #warn_error?
Constructor Details
This class inherits a constructor from BaseFormater
Instance Method Details
#end ⇒ Object
681
682
|
# File 'lib/saikuro.rb', line 681
def end
end
|
#end_count ⇒ Object
678
679
|
# File 'lib/saikuro.rb', line 678
def end_count
end
|
#end_file ⇒ Object
674
675
676
|
# File 'lib/saikuro.rb', line 674
def end_file
@out.puts ""
end
|
#line_token_count(line_number, number_of_tokens) ⇒ Object
668
669
670
671
672
|
# File 'lib/saikuro.rb', line 668
def line_token_count(line_number,number_of_tokens)
return if @filter.ignore?(number_of_tokens)
warn_error?(number_of_tokens, line_number)
@out.puts "Line:#{line_number} ; Tokens : #{number_of_tokens}"
end
|
#start(new_out = nil) ⇒ Object
653
654
655
656
657
|
# File 'lib/saikuro.rb', line 653
def start(new_out=nil)
reset_data
@out = new_out if new_out
@out.puts "Token Count"
end
|
#start_count(number_of_files) ⇒ Object
659
660
661
|
# File 'lib/saikuro.rb', line 659
def start_count(number_of_files)
@out.puts "Counting tokens for #{number_of_files} files."
end
|
#start_file(file_name) ⇒ Object
663
664
665
666
|
# File 'lib/saikuro.rb', line 663
def start_file(file_name)
@current = file_name
@out.puts "File:#{file_name}"
end
|