Class: CodeSage::GitAnalyzer
- Inherits:
-
Object
- Object
- CodeSage::GitAnalyzer
- Defined in:
- lib/code_sage/git_analyzer.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#repo_path ⇒ Object
readonly
Returns the value of attribute repo_path.
Instance Method Summary collapse
- #get_changes ⇒ Object
-
#initialize(options = {}) ⇒ GitAnalyzer
constructor
A new instance of GitAnalyzer.
Constructor Details
#initialize(options = {}) ⇒ GitAnalyzer
Returns a new instance of GitAnalyzer.
7 8 9 10 11 |
# File 'lib/code_sage/git_analyzer.rb', line 7 def initialize( = {}) @options = @repo_path = Dir.pwd @repo = Rugged::Repository.new(@repo_path) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/code_sage/git_analyzer.rb', line 5 def @options end |
#repo_path ⇒ Object (readonly)
Returns the value of attribute repo_path.
5 6 7 |
# File 'lib/code_sage/git_analyzer.rb', line 5 def repo_path @repo_path end |
Instance Method Details
#get_changes ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/code_sage/git_analyzer.rb', line 13 def get_changes if @options[:files] analyze_specific_files(@options[:files]) else analyze_branch_changes(@options[:branch]) end end |