Class: Instadoc::Analyzer
- Inherits:
-
Object
- Object
- Instadoc::Analyzer
- Defined in:
- lib/instadoc/analyzer.rb
Instance Method Summary collapse
- #create_documentation ⇒ Object
- #create_file(path) ⇒ Object
-
#initialize(config = Instadoc.config) ⇒ Analyzer
constructor
A new instance of Analyzer.
- #java ⇒ Object
- #validate_directory(base_dir) ⇒ Object
Constructor Details
Instance Method Details
#create_documentation ⇒ Object
11 12 13 14 15 |
# File 'lib/instadoc/analyzer.rb', line 11 def create_documentation() java_files = java() html_builder = Instadoc::HtmlBuilder.new(@config) html_builder.create(java_files) end |
#create_file(path) ⇒ Object
23 24 25 |
# File 'lib/instadoc/analyzer.rb', line 23 def create_file(path) Pathname.new(File.new(path, 'w').path) end |
#java ⇒ Object
17 18 19 20 21 |
# File 'lib/instadoc/analyzer.rb', line 17 def java() java_code = Instadoc::Java::JavaCode.new(@config) java_code.search(@config.input_path) java_code.files end |
#validate_directory(base_dir) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/instadoc/analyzer.rb', line 27 def validate_directory(base_dir) unless FileTest.exists?(base_dir) STDERR.puts "Requires a existing path! Given was => #{base_dir}" exit false end end |