returns:
$ ruby test_rucus.rb
/usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/relate.rb:17:in block in relate': wrong number of arguments (1 for 0) (ArgumentError) from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/initializers.rb:11:ininstance_eval'
from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/initializers.rb:11:in block in final_initialization_hook' from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/initializers.rb:11:ineach'
from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/initializers.rb:11:in final_initialization_hook' from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/defaults.rb:13:infinal_initialization_hook'
from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure.rb:115:in final_initialization_hook' from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure.rb:172:ininitialize'
from test_rucus.rb:12:in new' from test_rucus.rb:12:in'
The provided demo
!/usr/bin/env ruby
require 'ruckus'
class Foo < Ruckus::Structure byte :id byte :len str :string relate_size :string, :to => :len relate_value :len, :to => :string, :through => :size end
r = Foo.new r.string = "HAHAHAHA" pp r.to_human
returns: $ ruby test_rucus.rb /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/relate.rb:17:in'
block in relate': wrong number of arguments (1 for 0) (ArgumentError) from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/initializers.rb:11:in
instance_eval' from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/initializers.rb:11:inblock in final_initialization_hook' from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/initializers.rb:11:in
each' from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/initializers.rb:11:infinal_initialization_hook' from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure/defaults.rb:13:in
final_initialization_hook' from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure.rb:115:infinal_initialization_hook' from /usr/lib/ruby/gems/1.9.1/gems/ruckus-0.6.0/lib/ruckus/structure.rb:172:in
initialize' from test_rucus.rb:12:innew' from test_rucus.rb:12:in