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 f804b4b3eccc2f79b6d8d22f65caf938b850351b
tree 8e1ceb811050d65fd8a07b0754eb460df7175b67
parent cc098a164e6ebf0b372848ee700ec28f394c90dc
tree 8e1ceb811050d65fd8a07b0754eb460df7175b67
parent cc098a164e6ebf0b372848ee700ec28f394c90dc
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Apr 05 17:14:46 -0700 2009 | |
| |
README.textile | ||
| |
Rakefile | ||
| |
bin/ | Sun Apr 05 18:33:01 -0700 2009 | |
| |
distribunaut.gemspec | ||
| |
lib/ | ||
| |
spec/ |
README.textile
Examples
Example #1
# 'Server' application
require 'distribunaut'
configatron.distribunaut.app_name = :user_app
class User
include Distribunaut::Distributable
attr_accessor :username
def self.hi
'hello!!!'
end
def save
puts "Saving: #{self.inspect}"
end
end
DRb.thread.join
# Saving: #<User:0x18ef764 @username="markbates">
# 'Client' application
require 'distribunaut'
puts Distribunaut::Distributed::User.hi
User = Distribunaut::Distributed::User
puts User.hi
user = User.new
puts user.inspect
user.username = 'markbates'
puts user.inspect
user.save
# hello!!!
# hello!!!
# #<DRb::DRbObject:0x192e6a8 @ref=13073330, @uri="druby://192.168.1.2:56836">|#<User:0x18ef764>
# #<DRb::DRbObject:0x192e6a8 @ref=13073330, @uri="druby://192.168.1.2:56836">|#<User:0x18ef764 @username="markbates">








