Created
May 28, 2009 02:56
-
-
Save patmaddox/119061 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This comes from GenericWebLibrary | |
class BaseComponent | |
end | |
# This comes from RestExtensionLibrary | |
class RestComponent < BaseComponent | |
end | |
# In a language with mixins you could do | |
module SomeFilterStuff | |
def login_required; end | |
end | |
class MyBaseComponent < BaseComponent | |
include SomeFilterStuff | |
end | |
class MyRestComponent < RestComponent | |
include SomeFilterStuff | |
end | |
# without mixins what do you do?! My solution is | |
class BaseComponent | |
def login_required; end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment