Class: Gooby::CodeScanner
- Inherits:
-
GoobyObject
- Object
- GoobyObject
- Gooby::CodeScanner
- Defined in:
- lib/gooby_code_scanner.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ CodeScanner
constructor
A new instance of CodeScanner.
Methods included from GoobyKernel
#character_align, #default_delimiter, #invalid_altitude, #invalid_heartbeat, #invalid_latitude, #invalid_longitude, #invalid_time, #project_author, #project_copyright, #project_date, #project_embedded_comment, #project_license, #project_name, #project_version_number, #project_year, #read_as_ascii_lines, #read_lines, #strip_lines, #tokenize
Constructor Details
#initialize(argv) ⇒ CodeScanner
Returns a new instance of CodeScanner.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/gooby_code_scanner.rb', line 13 def initialize(argv) function = 'outline' if (argv.size > 1) function = argv[1] end @code_file = argv[0] @test_file = "ts_#{@code_file}" @code_lines = read_lines("lib/#{@code_file}") @test_lines = read_lines("tests/#{@test_file}") puts "code lines = #{@code_lines.size}" puts "test lines = #{@test_lines.size}" @tokens_hash = CounterHash.new @module_names_hash = CounterHash.new @class_names_hash = CounterHash.new @method_names_hash = CounterHash.new @mc_line_num_array = Array.new @type_names = Hash.new @code_hash = Hash.new @test_hash = Hash.new @api_hash = Hash.new @merged_hash = Hash.new @exclude_classes = Array.new regenerate_test_suite if (function == 'regenerate_test_suite') regenerate_test_suite if (function == 'tests') model_class_outline if (function == 'model_class_outline') model_class_outline if (function == 'outline') quick_reference_guide if (function == 'quick_reference_guide') quick_reference_guide if (function == 'qrg') mcm_references if (function == 'mcm_references') mcm_references if (function == 'mcm') end |