Last Modified
2013-07-15 00:30:05 +0000
Requires
Trac URL
http://bogomips.org/raindrops.git/tree/lib/raindrops/struct.rb

Description

This is a wrapper around Raindrops objects much like the core Ruby Struct can be seen as a wrapper around the core Array class. It's usage is similar to the core Struct class, except its fields may only be used to house unsigned long integers.

class Foo < Raindrops::Struct.new(:readers, :writers)
end

foo = Foo.new 0, 0

foo.incr_writers    -> 1
foo.incr_readers    -> 1