Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A pure ruby solution for unmixing modules.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 rake_tasks
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 BUGS.rdoc
Octocat-spinner-32 GPL_LICENSE
Octocat-spinner-32 MIT_LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 mix_master.gemspec
README.rdoc

MixMaster

A pure ruby solution for mixing & unmix modules from classes.

module Foo
  def foo
    'foo'
  end
end

class Baz
  mixin Foo
end

b = Baz.new
=> #<Baz:0x6aa48c>
b.foo
=> "foo"

Baz.mixout Foo
=> [Foo]

Baz.new.foo
NoMethodError: undefined method `foo' for #<Baz:0x69a640>
	from (irb):30
b.foo
NoMethodError: undefined method `foo' for #<Baz:0x6aa48c>
	from (irb):31

Inspiration

Both _why's and Dan Manges' libraries (mixico and mixology) have been of great inspiration.

Something went wrong with that request. Please try again.