Skip to content

Instantly share code, notes, and snippets.

@jccarbonfive
Created May 16, 2012 23:40
Show Gist options
  • Select an option

  • Save jccarbonfive/2714930 to your computer and use it in GitHub Desktop.

Select an option

Save jccarbonfive/2714930 to your computer and use it in GitHub Desktop.
module Bar
def self.included(clazz)
clazz.extend Baz
end
module Baz
def bar
puts 'bar'
end
end
end
class Foo
class << self
include Bar
end
end
Foo.bar => foo.rb:20:in `<main>': undefined method `bar' for Foo:Class (NoMethodError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment