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.



766
767
768
769
770
771
# File 'lib/buildr/core/project.rb', line 766

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

Instance Attribute Details

#blocksObject

:nodoc:



764
765
766
# File 'lib/buildr/core/project.rb', line 764

def blocks
  @blocks
end

#dependenciesObject

:nodoc:



764
765
766
# File 'lib/buildr/core/project.rb', line 764

def dependencies
  @dependencies
end

#nameObject

:nodoc:



764
765
766
# File 'lib/buildr/core/project.rb', line 764

def name
  @name
end

#phaseObject

:nodoc:



764
765
766
# File 'lib/buildr/core/project.rb', line 764

def phase
  @phase
end

Instance Method Details

#merge(callback) ⇒ Object



773
774
775
# File 'lib/buildr/core/project.rb', line 773

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