Class: Watobo::NTLM::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/watobo/utils/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



306
307
308
309
# File 'lib/watobo/utils/ntlm.rb', line 306

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

Instance Attribute Details

#activeObject

Returns the value of attribute active.



304
305
306
# File 'lib/watobo/utils/ntlm.rb', line 304

def active
  @active
end

#valueObject

Returns the value of attribute value.



304
305
306
# File 'lib/watobo/utils/ntlm.rb', line 304

def value
  @value
end

Instance Method Details

#sizeObject



311
312
313
# File 'lib/watobo/utils/ntlm.rb', line 311

def size
  @active ? @size : 0
end