Skip to content

Instantly share code, notes, and snippets.

@DimaSamodurov
Last active January 27, 2020 21:02
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 DimaSamodurov/812510125353550ef6264b0da71e859c to your computer and use it in GitHub Desktop.
Save DimaSamodurov/812510125353550ef6264b0da71e859c to your computer and use it in GitHub Desktop.
module A
def foo
:a
end
end
module B
def foo
:b
end
end
module D
def foo
:d
end
end
module F
def foo
:f
end
end
module H
def foo
:h
end
end
class C
include A
prepend B
def foo
:c
end
end
c = C.new
def c.foo
:e
end
c.extend D
c.singleton_class.include F
c.singleton_class.prepend H
c.foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment