Class: Buildr::Extension::Callback

Inherits:
Object
  • Object
show all
Defined in:
lib/buildr/core/project.rb

Overview

Extension callback details

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(phase, name, dependencies, blocks) ⇒ Callback

Returns a new instance of Callback.



743
744
745
746
747
748
# File 'lib/buildr/core/project.rb', line 743

def initialize(phase, name, dependencies, blocks)
  @phase = phase
  @name = name
  @dependencies = dependencies
  @blocks = (blocks ? (Array === blocks ? blocks : [blocks]) : [])
end

Instance Attribute Details

#blocksObject

:nodoc:



741
742
743
# File 'lib/buildr/core/project.rb', line 741

def blocks
  @blocks
end

#dependenciesObject

:nodoc:



741
742
743
# File 'lib/buildr/core/project.rb', line 741

def dependencies
  @dependencies
end

#nameObject

:nodoc:



741
742
743
# File 'lib/buildr/core/project.rb', line 741

def name
  @name
end

#phaseObject

:nodoc:



741
742
743
# File 'lib/buildr/core/project.rb', line 741

def phase
  @phase
end

Instance Method Details

#merge(callback) ⇒ Object



750
751
752
# File 'lib/buildr/core/project.rb', line 750

def merge(callback)
  Callback.new(phase, name, @dependencies + callback.dependencies, @blocks + callback.blocks)
end