Class: DSP::Checksum

Inherits:
DSPBase show all
Defined in:
lib/dsp/dsp_protocol.rb

Overview

interface Checksum {

    /** The algorithm used to calculate this checksum. */
    algorithm: ChecksumAlgorithm;
    /** Value of the checksum. */
    checksum: string;
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#initialize, #to_h, #to_json

Constructor Details

This class inherits a constructor from DSP::DSPBase

Instance Attribute Details

#algorithmObject

type: ChecksumAlgorithm # type: string



4421
4422
4423
# File 'lib/dsp/dsp_protocol.rb', line 4421

def algorithm
  @algorithm
end

#checksumObject

type: ChecksumAlgorithm # type: string



4421
4422
4423
# File 'lib/dsp/dsp_protocol.rb', line 4421

def checksum
  @checksum
end

Instance Method Details

#from_h!(value) ⇒ Object



4423
4424
4425
4426
4427
4428
# File 'lib/dsp/dsp_protocol.rb', line 4423

def from_h!(value)
  value = {} if value.nil?
  self.algorithm = value['algorithm'] # Unknown type
  self.checksum = value['checksum']
  self
end