Class: Pack::Delta::Insert

Inherits:
Struct
  • Object
show all
Defined in:
lib/pack/delta.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



25
26
27
# File 'lib/pack/delta.rb', line 25

def data
  @data
end

Class Method Details

.parse(input, byte) ⇒ Object



26
27
28
# File 'lib/pack/delta.rb', line 26

def self.parse(input, byte)
  Insert.new(input.read(byte))
end

Instance Method Details

#to_sObject



30
31
32
# File 'lib/pack/delta.rb', line 30

def to_s
  [data.bytesize, data].pack("Ca*")
end