Skip to content

Instantly share code, notes, and snippets.

@benhoskings
Created September 1, 2008 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benhoskings/8277 to your computer and use it in GitHub Desktop.
Save benhoskings/8277 to your computer and use it in GitHub Desktop.
def self.define_the_methods name
(class << self; self; end).instance_eval {
define_method name do |account|
log 'class'
end
}
define_method name do |account|
log 'instance'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment