Parent

Files

Class/Module Index [+]

Quicksearch

Capistrano::Callback

Attributes

except[R]
only[R]
options[R]
source[R]

Public Class Methods

new(source, options={}) click to toggle source
# File lib/capistrano/callback.rb, line 5
def initialize(source, options={})
  @source = source
  @options = options
  @only = Array(options[:only]).map { |v| v.to_s }
  @except = Array(options[:except]).map { |v| v.to_s }
end

Public Instance Methods

applies_to?(task) click to toggle source
# File lib/capistrano/callback.rb, line 12
def applies_to?(task)
  if task && only.any?
    return only.include?(task.fully_qualified_name)
  elsif task && except.any?
    return !except.include?(task.fully_qualified_name)
  else
    return true
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.