Class: FlyingSphinx::Tasks::Replaced
- Inherits:
-
Object
- Object
- FlyingSphinx::Tasks::Replaced
- Includes:
- Rake::DSL
- Defined in:
- lib/flying_sphinx/tasks/replaced.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(name, dependencies, block) ⇒ Replaced
constructor
A new instance of Replaced.
Constructor Details
#initialize(name, dependencies, block) ⇒ Replaced
Returns a new instance of Replaced.
8 9 10 11 12 |
# File 'lib/flying_sphinx/tasks/replaced.rb', line 8 def initialize(name, dependencies, block) @name = name @dependencies = dependencies @block = block end |
Class Method Details
.call(name, dependencies = [:environment], &block) ⇒ Object
4 5 6 |
# File 'lib/flying_sphinx/tasks/replaced.rb', line 4 def self.call(name, dependencies = [:environment], &block) new(name, dependencies, block).call end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/flying_sphinx/tasks/replaced.rb', line 14 def call return unless Rake::Task.task_defined?(name) original = Rake::Task[name] original.clear desc original.comment task name => dependencies, &block end |