Class: Tar::Schema::FieldType

Inherits:
Object
  • Object
show all
Defined in:
lib/tar/schema.rb

Direct Known Subclasses

OctalNumber, String

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(size, offset, unpack_format:) ⇒ FieldType

Returns a new instance of FieldType.



54
55
56
57
58
# File 'lib/tar/schema.rb', line 54

def initialize(size, offset, unpack_format:)
  @size = size
  @offset = offset
  @unpack_format = unpack_format
end

Instance Attribute Details

#offsetObject (readonly)

Returns the value of attribute offset.



52
53
54
# File 'lib/tar/schema.rb', line 52

def offset
  @offset
end

#sizeObject (readonly)

Returns the value of attribute size.



52
53
54
# File 'lib/tar/schema.rb', line 52

def size
  @size
end

#unpack_formatObject (readonly)

Returns the value of attribute unpack_format.



52
53
54
# File 'lib/tar/schema.rb', line 52

def unpack_format
  @unpack_format
end