Sha256: 49bba2f29276441b6f7b4f922bddbce0eb91df9930c38b48f6263f1ffa27eae5

Contents?: true

Size: 338 Bytes

Versions: 1

Compression:

Stored size: 338 Bytes

Contents

require 'rake/tasklib'

module Albacore
	class SftpTask < Rake::TaskLib
		attr_accessor :name
		
		def initialize(name=:sftp, &block)
			@name = name
			@sftp = Sftp.new
			@block = block
			define
		end
		
		def define
			task name do
				@block.call(@sftp) unless @block.nil?
				@sftp.upload
			end
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
albacore-0.0.7 lib/rake/sftptask.rb