# File lib/rex/struct2/c_struct.rb, line 14 def [](*args) o = @obj[*args] return if !o return o.value end
# File lib/rex/struct2/c_struct.rb, line 20 def []=(*args) o = @obj[*args[0 .. -2]] return if !o o.value = args[-1] end
this one is for HD, the whiniest girl around... allow for like v.field = whatever
# File lib/rex/struct2/c_struct.rb, line 28 def method_missing(sym, *args) if sym.to_s[-1] == "="[0] return self[sym.to_s[0 .. -2]] = args[0] else return self[sym.to_s] end end
Generated with the Darkfish Rdoc Generator 2.