This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo | |
def self.demo | |
puts "Module Demo" | |
end | |
end | |
class Bar | |
include Foo | |
def self.demo | |
puts "Class Demo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
NewerOlder