Skip to content

Instantly share code, notes, and snippets.

@vireshas
Last active July 29, 2016 04:33
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 vireshas/ec22cba9c98ab113738a9e036fc9549f to your computer and use it in GitHub Desktop.
Save vireshas/ec22cba9c98ab113738a9e036fc9549f to your computer and use it in GitHub Desktop.
mixin in sub-class
module C
def a
puts "a"
end
end
class A
include C
end
class B < A
end
B.new.a
>> ruby mixin_in_subclass.rb
a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment