Class: Diggit::Analysis Abstract
Overview
This class is abstract.
Subclass and override run and clean to implement a custom analysis class.
Base class for analyses. Diggit analyses are applied on each source that has been succesfully cloned. They can access the Diggit addons through the addons attribute.
Instance Attribute Summary collapse
-
#source ⇒ Source
The source to be analyzed.
Attributes inherited from Runnable
Attributes inherited from Plugin
Instance Method Summary collapse
-
#initialize(options) ⇒ Analysis
constructor
A new instance of Analysis.
-
#repo ⇒ Rugged::Repository
Returns the rugged repository associated to the source.
Methods inherited from Runnable
#clean, require_addons, required_addons, #run
Methods inherited from Plugin
Constructor Details
#initialize(options) ⇒ Analysis
Returns a new instance of Analysis.
180 181 182 183 |
# File 'lib/dgit/plugins.rb', line 180 def initialize() super() @source = nil end |
Instance Attribute Details
#source ⇒ Source
Returns the source to be analyzed.
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/dgit/plugins.rb', line 177 class Analysis < Runnable attr_accessor :source def initialize() super() @source = nil end # Returns the rugged repository associated to the source. # # @return [Rugged::Repository] def repo @source.repository end end |
Instance Method Details
#repo ⇒ Rugged::Repository
Returns the rugged repository associated to the source.
188 189 190 |
# File 'lib/dgit/plugins.rb', line 188 def repo @source.repository end |