Object
base class of data structure
base class of data structure
# File lib/net/ntlm_http.rb, line 362 def define(&block) c = Class.new(self) def c.inherited(subclass) proto = @proto subclass.instance_eval { @proto = proto } end c.module_eval(&block) c end
# File lib/net/ntlm_http.rb, line 378 def int16LE(name, opts) add_field(name, Int16LE, opts) end
# File lib/net/ntlm_http.rb, line 382 def int32LE(name, opts) add_field(name, Int32LE, opts) end
# File lib/net/ntlm_http.rb, line 386 def int64LE(name, opts) add_field(name, Int64LE, opts) end
# File lib/net/ntlm_http.rb, line 398 def names @proto.map{|n, t, o| n} end
# File lib/net/ntlm_http.rb, line 430 def initialize @alist = self.class.prototypes.map{ |n, t, o| [n, t.new(o)] } end
# File lib/net/ntlm_http.rb, line 406 def opts @proto.map{|n, t, o| o} end
# File lib/net/ntlm_http.rb, line 390 def security_buffer(name, opts) add_field(name, SecurityBuffer, opts) end
# File lib/net/ntlm_http.rb, line 446 def [](name) a = @alist.assoc(name.to_s.intern) raise ArgumentError, "no such field: #{name}" unless a a[1] end
# File lib/net/ntlm_http.rb, line 452 def []=(name, val) a = @alist.assoc(name.to_s.intern) raise ArgumentError, "no such field: #{name}" unless a a[1] = val end
# File lib/net/ntlm_http.rb, line 462 def disable(name) self[name].active = false end
# File lib/net/ntlm_http.rb, line 458 def enable(name) self[name].active = true end
# File lib/net/ntlm_http.rb, line 438 def parse(str, offset=0) @alist.inject(offset){|cur, a| cur += a[1].parse(str, cur)} end
Generated with the Darkfish Rdoc Generator 2.