Project

mixology

0.03
No commit activity in last 3 years
No release in over 3 years
Mixology enables objects to mixin and unmix modules.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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