Skip to content

Instantly share code, notes, and snippets.

@hexgnu
Last active August 29, 2015 14:04
Show Gist options
  • Save hexgnu/7f02a9f6e2a2b13b0f28 to your computer and use it in GitHub Desktop.
Save hexgnu/7f02a9f6e2a2b13b0f28 to your computer and use it in GitHub Desktop.
memcached-cli
#!/usr/bin/env ruby
require 'dalli'
require 'irb'
ARGV.clear
dc = Dalli::Client.new('localhost:11211')
dc.public_methods(false).each do |meth|
define_method meth do |*args, &block|
dc.public_send(meth, *args, &block)
end
end
puts "Methods available: #{dc.public_methods(false)}"
IRB.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment