Class: Gemma::RakeTasks::Plugin

Inherits:
Object
  • Object
show all
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

GemTasks, MinitestTasks, RDocTasks, YardTasks

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#gemspecGem::Specification (readonly)

Returns:

  • (Gem::Specification)


24
25
26
# File 'lib/gemma/rake_tasks/plugin.rb', line 24

def gemspec
  @gemspec
end

Instance Method Details

#create_rake_tasksnil

This method is abstract.

Internal method called by Gemma::RakeTasks after the configuration block has executed; overriden by plugins to create rake tasks.

Returns:

  • (nil)

Raises:

  • (NotImplementedError)


34
35
36
# File 'lib/gemma/rake_tasks/plugin.rb', line 34

def create_rake_tasks
  raise NotImplementedError
end