# Paramix

**URL:** <https://www.ruby-forum.com/t/paramix/133968>\
**Category:** Ruby\
**Created:** [April 5, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/paramix/133968 "2008-04-05T19:05:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [April 5, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/paramix/133968/1 "2008-04-05T19:05:07Z")

</div>

I’ve just finished restoring paramix.rb to Facets library. You can  
expect it in 2.4.2 which I will release soon. (Note that the version  
included in 2.4.1 is a work in progress and should not be used).

Just to let people know how it works now, as opposed to the old  
version which overrode #include itself, the new version uses a  
delegating module. So it is much more robust.

Here is a simple example:

require ‘facets/paramix’

module MyMixin  
include Paramix

```
 def hello
   puts "Hello from #{mixin_params[MyMixin][:name]}!"
 end

```

end

class MyClass  
include Mixin[:name =\> ‘Ruby’]  
end

m = MyClass.new  
m.hello -\> ‘Hello from Ruby!’

Notice the use of #[]. Capitalized methods have namespace issues, so  
the #[] method was used instead.

T.
