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 (
phuby /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Mar 11 15:14:25 -0700 2009 | |
| |
README.markdown | Thu Jun 11 14:47:55 -0700 2009 | |
| |
doc/ | Tue Jul 07 15:36:23 -0700 2009 | |
| |
lib/ | Tue Jul 07 15:36:23 -0700 2009 | |
| |
phuby.php | Fri Jun 19 13:48:25 -0700 2009 | |
| |
spec/ | Thu Jun 11 20:17:53 -0700 2009 | |
| |
test/ | Tue Jul 07 15:36:23 -0700 2009 |
README.markdown
phuby
rubyisms in php
(pronounced foo-bee)
Installation
git clone git://github.com/shuber/phuby.git
Features
- A base
Objectclass (all classes should inherit from this) - Mixins -
Post::extend('Validations'); - alias_method -
Post::alias_method('save_with_validation', 'save'); - alias_method_chain -
Post::alias_method_chain('save', 'validation'); - Procs -
$proc = new Proc('name', 'echo "hello $name";'); $proc->call('Sean'); - Various classes and modules from the standard ruby library like
Enumerable,Arr,Hash,Struct, etc
Usage
require_once 'phuby/phuby.php';
Make sure your classes extend Object
class User extends Object {
# ...
}
More coming soon...
Testing
Phuby uses SimpleSpec BDD extension to SimpleTest, just download simple test and put it as part of your php include_path or 'phuby/spec/simpletest'
- SimpleTest
- SimpleSpec class
please run spec/runner.php
Contact
Problems, comments, and suggestions all welcome: shuber@huberry.com







