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 bc8ec9cea84f3f83128b34deb0b9c4e36dfdca64
tree 6fe67b22c4e1b39d1089dc5f04d3ed91480bb965
parent 3b35773630806c926f13e84ca3b0e2b6fddde3c0
tree 6fe67b22c4e1b39d1089dc5f04d3ed91480bb965
parent 3b35773630806c926f13e84ca3b0e2b6fddde3c0
roxy /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
CHANGELOG | Sun Nov 09 10:39:27 -0800 2008 | |
| |
LICENSE | Sun Nov 09 10:39:27 -0800 2008 | |
| |
README.textile | ||
| |
Rakefile | Sun Nov 09 10:39:27 -0800 2008 | |
| |
init.rb | Sun Nov 09 10:39:27 -0800 2008 | |
| |
lib/ | ||
| |
roxy.gemspec | ||
| |
spec/ |
README.textile
Roxy (A ruby proxy library)
Summary
Roxy is a basic proxy library that lets you quickly create proxies between your ruby objects. Its syntax
is loosely based on Association Extensions in ActiveRecord
as that is a well-known use of proxies.
Please see the CHANGELOG for contribution details.
Roxy has the following dependencies:
- rspec >= 1.1.4 (for specs only, not runtime)
Installation
To install the roxy gem run the following:
sudo gem install yfactorial-roxy —source http://gems.github.comAnd to enable the scopes in your project just require the roxy library and give your object some moxie:
Usage
See the announcement post for detailed usage examples:
Here’s a basic example:
require 'roxy'
class Person
include Roxy::Moxie
attr_accessor :first, :last, :parents
proxy :parents do
def divorced?
proxy_target.size > 1 and proxy_target.collect { |parent| parent.last }.uniq.size > 1
end
end
end
# Can then invoke your proxy methods directly on parents
person.parents.divorced?








