Class: Diggit::Join Abstract
Overview
This class is abstract.
Subclass and override run and clean to implement a custom join class.
Base class for joins. Joins are applied on each source that has been:
-
succesfully cloned,
-
has been analyzed by the required analyses.
Required analyses are added with a call to Join.require_analyses. They can access addons through the addons attribute or with a method having the addon name.
Instance Attribute Summary collapse
-
#sources ⇒ Array<Source>
The sources to be joined.
Attributes inherited from Runnable
Attributes inherited from Plugin
Class Method Summary collapse
-
.require_analyses(*names) ⇒ void
Add an analysis as a required analysis.
- .required_analyses ⇒ Object
Instance Method Summary collapse
-
#initialize(options) ⇒ Join
constructor
A new instance of Join.
Methods inherited from Runnable
#clean, require_addons, required_addons, #run
Methods inherited from Plugin
Constructor Details
#initialize(options) ⇒ Join
Returns a new instance of Join.
136 137 138 139 |
# File 'lib/dgit/plugins.rb', line 136 def initialize() super() @sources = [] end |
Instance Attribute Details
#sources ⇒ Array<Source>
Returns the sources to be joined.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/dgit/plugins.rb', line 133 class Join < Runnable attr_accessor :sources def initialize() super() @sources = [] end # Add an analysis as a required analysis. # # @param names [Array<String>] the names of analyses to require. # They correspond to the name of their class with underscore case. # @return [void] def self.require_analyses(*names) @required_analyses = names end def self.required_analyses return [] if @required_analyses.nil? @required_analyses end end |
Class Method Details
.require_analyses(*names) ⇒ void
This method returns an undefined value.
Add an analysis as a required analysis.
146 147 148 |
# File 'lib/dgit/plugins.rb', line 146 def self.require_analyses(*names) @required_analyses = names end |
.required_analyses ⇒ Object
150 151 152 153 |
# File 'lib/dgit/plugins.rb', line 150 def self.required_analyses return [] if @required_analyses.nil? @required_analyses end |