Skip to content

Mixology allows objects to mixin and unmix modules.

Notifications You must be signed in to change notification settings

moorecp/mixology

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mixology

a gem that allows objects to effectively mixin and unmix modules

installation

gem install mixology

usage

require "mixology"

mixin = Module.new { def foo; "foo from mixin"; end }
object = Class.new { def foo; "foo from object"; end }.new

object.mixin mixin
object.foo #=> "foo from mixin"

object.unmix mixin
object.foo #=> "foo from object"

that's pretty much it. for other examples, take a look at the tests.

implementations

  • MRI 1.8.x, 1.9.x
  • JRuby 1.1.x

collaborators

source

hosted on github

license

released under Ruby's license

About

Mixology allows objects to mixin and unmix modules.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 55.1%
  • Java 25.9%
  • C 19.0%