Class: McDump::Rake::Task

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/mc_dump/rake/task.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, connection_args) ⇒ Task

Returns a new instance of Task.


6
7
8
9
10
11
12
13
14
15
# File 'lib/mc_dump/rake/task.rb', line 6

def initialize(name, connection_args)
  desc "Dumps contents of a memcached instance, supports arguments: host, port, timeout_in_seconds"
  task(name) do
    McDump.server({
      host:               ENV["host"],
      port:               ENV["port"],
      timeout_in_seconds: ENV["timeout_in_seconds"]
    }.merge(connection_args))
  end
end