patmaddox (owner)

Forks

Revisions

gist: 119061 Download_button fork
public
Public Clone URL: git://gist.github.com/119061.git
Embed All Files: show embed
blah.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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