Class: Net::NTLM::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/watobo/external/ntlm/ntlm.rb

Overview

base classes for primitives

Direct Known Subclasses

Int16LE, Int32LE, Int64LE, String

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Field

Returns a new instance of Field.



281
282
283
284
# File 'lib/watobo/external/ntlm/ntlm.rb', line 281

def initialize(opts)
  @value  = opts[:value]
  @active = opts[:active].nil? ? true : opts[:active]
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



279
280
281
# File 'lib/watobo/external/ntlm/ntlm.rb', line 279

def active
  @active
end

#valueObject

Returns the value of attribute value.



279
280
281
# File 'lib/watobo/external/ntlm/ntlm.rb', line 279

def value
  @value
end

Instance Method Details

#sizeObject



286
287
288
# File 'lib/watobo/external/ntlm/ntlm.rb', line 286

def size
  @active ? @size : 0
end