Skip to content

Instantly share code, notes, and snippets.

@srid
Created December 16, 2011 16:56
Show Gist options
  • Save srid/1486867 to your computer and use it in GitHub Desktop.
Save srid/1486867 to your computer and use it in GitHub Desktop.
# main module
require 'foo/bar'
module Foo
include Foo::Bar
EventMachine.run do
dothis # instead of Foo::Bar.dothis
end
....
# foo/bar.rb
module Foo::Bar
class << self
def dothis
...
# error when I ran foo.rb
undefined method `dothis' for Foo:Module (NoMethodError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment