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.



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

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

Instance Attribute Details

#blocksObject

:nodoc:



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

def blocks
  @blocks
end

#dependenciesObject

:nodoc:



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

def dependencies
  @dependencies
end

#nameObject

:nodoc:



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

def name
  @name
end

#phaseObject

:nodoc:



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

def phase
  @phase
end

Instance Method Details

#merge(callback) ⇒ Object



754
755
756
# File 'lib/buildr/core/project.rb', line 754

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