This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit e9b4679be5e6f7afab21ac24a78fe2374ec720c2
tree 2c96b798e4a10d95497e200d0e5e60d362f76029
parent c4901b53f2d973c17595eec0b4b140bfe7971d52
tree 2c96b798e4a10d95497e200d0e5e60d362f76029
parent c4901b53f2d973c17595eec0b4b140bfe7971d52
| name | age | message | |
|---|---|---|---|
| |
.document | Fri Jun 05 02:19:35 -0700 2009 | |
| |
.gitignore | Fri Jun 05 02:19:35 -0700 2009 | |
| |
LICENSE | Fri Jun 05 02:19:35 -0700 2009 | |
| |
README.md | ||
| |
Rakefile | ||
| |
VERSION.yml | Sun Jun 07 19:12:41 -0700 2009 | |
| |
attr-chain.gemspec | ||
| |
lib/ | ||
| |
spec/ | Fri Jun 05 06:04:17 -0700 2009 |
README.md
attr-chain
attr-chain is for when you're building up a DSL in which you'd like to have attributes
that can be chained together when they're being set.
Its simple and small, you probably aren't interested. I kept on using this pattern and wanted to abstract it away from my other code.
Working example
require 'attr-chain'
class Chainsaw
include AttributeChain
attr_chain :start, :cut
end
>> c = Chainsaw.new
>> c.start
=> nil
>> c.start(:now).cut(:hippy)
>> c.start
=> :now
>> c.cut
=> :hippy
Copyright
Copyright (c) 2009 Ben Schwarz. See LICENSE for details.








