Class: Gemma::RakeTasks::Plugin
- Inherits:
-
Object
- Object
- Gemma::RakeTasks::Plugin
- Includes:
- Rake::DSL
- Defined in:
- lib/gemma/rake_tasks/plugin.rb
Overview
Plugins generate rake tasks based on the content of the gemspec.
The intention is that the plugin processes the gemspec and sets (intelligent) default values when it is created. The Gemma::RakeTasks object then calls #create_rake_tasks on every plugin that it knows about, after it has run its configuration block. The configuration block gives the caller a chance to customize the inputs to all of the plugins before they are generated.
Direct Known Subclasses
Instance Attribute Summary collapse
- #gemspec ⇒ Gem::Specification readonly
Instance Method Summary collapse
-
#create_rake_tasks ⇒ nil
abstract
Internal method called by Gemma::RakeTasks after the configuration block has executed; overriden by plugins to create rake tasks.
-
#initialize(gemspec) ⇒ Plugin
constructor
A new instance of Plugin.
Constructor Details
#initialize(gemspec) ⇒ Plugin
Returns a new instance of Plugin.
17 18 19 |
# File 'lib/gemma/rake_tasks/plugin.rb', line 17 def initialize(gemspec) @gemspec = gemspec end |
Instance Attribute Details
#gemspec ⇒ Gem::Specification (readonly)
24 25 26 |
# File 'lib/gemma/rake_tasks/plugin.rb', line 24 def gemspec @gemspec end |
Instance Method Details
#create_rake_tasks ⇒ nil
Internal method called by Gemma::RakeTasks after the configuration block has executed; overriden by plugins to create rake tasks.
34 35 36 |
# File 'lib/gemma/rake_tasks/plugin.rb', line 34 def create_rake_tasks raise NotImplementedError end |