Skip to content

Instantly share code, notes, and snippets.

View JoshMcKin's full-sized avatar

Joshua T. Mckinney JoshMcKin

  • New Braunfels, TX
View GitHub Profile
class Foo
attr_accessor :test
def self.new_with_params(params={})
f = Foo.new
params.each do |param|
# if method exists send value
f.send(param[0].to_s + "=",param[1]) if f.respond_to?(param[0].to_s)
end
f
module Foo
def self.demo
puts "Module Demo"
end
end
class Bar
include Foo
def self.demo
puts "Class Demo"
# memcached default config file
# 2003 - Jay Bonci <[email protected]>
# This configuration file is read by the start-memcached script provided as
# part of the Debian GNU/Linux distribution.
# Run memcached as a daemon. This command is implied, and is not needed for the
# daemon to run. See the README.Debian that comes with this package for more
# information.
-d