Class: RakeDeploy::Tasks

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/rake_deploy.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Tasks

Returns a new instance of Tasks.



20
21
22
# File 'lib/rake_deploy.rb', line 20

def initialize(config)
  @config = config
end

Instance Method Details

#install_tasksObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/rake_deploy.rb', line 24

def install_tasks
  namespace :deploy do
    @config.each do |name, options|
      desc "Deploy #{name}"
      task name do |t, args|
        Rsyncer.new(name, options).rsync
      end
    end
  end
end