Class: Tar::Schema::String
Instance Attribute Summary
Attributes inherited from FieldType
#offset, #size, #unpack_format
Instance Method Summary collapse
-
#initialize(size, offset) ⇒ String
constructor
A new instance of String.
- #parse(value) ⇒ Object
Constructor Details
#initialize(size, offset) ⇒ String
Returns a new instance of String.
62 63 64 |
# File 'lib/tar/schema.rb', line 62 def initialize(size, offset) super(size, offset, unpack_format: "Z#{size}") end |
Instance Method Details
#parse(value) ⇒ Object
66 67 68 |
# File 'lib/tar/schema.rb', line 66 def parse(value) value unless value.empty? end |