public
Description: Easily add DSL accessors to any class without bothering to mess with the gory details of their implementation
Homepage: http://blog.xnot.org
Clone URL: git://github.com/auser/dslify.git
Click here to lend your support to: dslify and make a donation at www.pledgie.com !
dslify /
name age message
file .gitignore Fri Dec 19 19:35:05 -0800 2008 Updated gemspec for github [Ari Lerner]
file LICENSE Fri May 08 00:57:55 -0700 2009 Added new dslify in [auser]
file README.rdoc Fri May 08 00:57:55 -0700 2009 Updated readme [auser]
file Rakefile Fri May 08 00:57:55 -0700 2009 Added new dslify in [auser]
directory lib/ Loading commit data...
directory test/
README.rdoc

dslify

Dslify, born out of a need for improvement on Dslify

Add dsl accessors to any class.

Usage:

  class MyClass
    include Dslify

    dsl_methods :award, :people
  end

  mc = MyClass.new
  mc.award "Tony Award"
  mc.people ["Bob", "Frank", "Ben"]

You can set defaults as well:

  class MyClass
    default_options :award => "Tony Award"
  end

Finally, if your tree of available accessors runs higher and longer than just 1 file, for instance, if you use Parenting, you can set forwarders to forward the query up the chain

class MyClass

  forwards_to :parent

end

Copyright

Copyright © 2009 Ari Lerner. See LICENSE for details.