--001636e1efd589426a04b31a2ff0
Content-Type: text/plain; charset=ISO-8859-1

I would suggest an Adapter pattern use here. IF there is something that has
functionality that you want to have shared, and one thing changes, I would
make different subclasses. Example:

class Team # Base class

def play
  raise "You should use a subclass of Team."
end

end

class FootballTeam < Team # Adapter to a football team

def play
  play_football
end

end

class BaseballTeam < Team # Adapter to a baseball team

def play
  play_baseball
end

end

On Fri, Dec 2, 2011 at 3:24 AM, Ryan Davis <ryand-ruby / zenspider.com> wrote:

>
>
> On Dec 1, 2011, at 22:57, Su Zhang <su.comp.lang.ruby / gmail.com> wrote:
>
> > Is there a built-in inverse operation of Module#include? Currently I
> have:
>
> My "un" gem will do the trick, but there is nothing built in
>
>


-- 
Sincerely,

Isaac Sanders
Section C-4B Vice Chief, Order of the Arrow
Vice Chief of Administration, Tecumseh #65
Eagle Scout

--001636e1efd589426a04b31a2ff0--