Class: AAMVA::SubfileDesignator

Inherits:
Object
  • Object
show all
Defined in:
lib/aamva/subfile_designator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, length:, offset:) ⇒ SubfileDesignator

Returns a new instance of SubfileDesignator.



5
6
7
8
9
# File 'lib/aamva/subfile_designator.rb', line 5

def initialize(type:, length:, offset:)
  @type = type
  @length = length
  @offset = offset
end

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length.



3
4
5
# File 'lib/aamva/subfile_designator.rb', line 3

def length
  @length
end

#offsetObject (readonly)

Returns the value of attribute offset.



3
4
5
# File 'lib/aamva/subfile_designator.rb', line 3

def offset
  @offset
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/aamva/subfile_designator.rb', line 3

def type
  @type
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
14
15
# File 'lib/aamva/subfile_designator.rb', line 11

def ==(other)
  type == other.type &&
    offset == other.offset &&
    length == other.length
end