Sha256: 12ba045d3e9ca33f2b4260c4fb8acd2cfe54665b43ff620107b5f1d04e8b98d6
Contents?: true
Size: 850 Bytes
Versions: 1
Compression:
Stored size: 850 Bytes
Contents
= Paramix * home: http://rubyworks.github.com/paramix * work: http://github.com/rubyworks/paramix == DESCRIPTION Parametric Mixins provides an easy means to "functionalize" modules. The module can then be differentiated upon usage according to the parameters provided. == RELEASE NOTES Please see HISTORY.rdoc file. == EXAMPLE Here is a simple example that uses a a parameter to define a method and another parameter to define it's return value. module M include Paramix::Parametric paramaterized do |params| define_method params[:name] do params[:value] end end end class X include M[:name=>'foo', :value='bar'] end X.new.foo #=> 'bar' == COPYRIGHTS Copyright (c) 2006,2010 Thomas Sawyer This program is ditributed unser the terms of the MIT license. See LICENSE file for details.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
paramix-2.0.0 | README.rdoc |