class Exonum::Int8T
Public Class Methods
fixed?()
click to toggle source
# File lib/exonum/types/primitive.rb, line 21 def self.fixed? true end
serialize(value, buffer, from, shift=0)
click to toggle source
# File lib/exonum/types/primitive.rb, line 25 def self.serialize value, buffer, from, shift=0 raise 'Incorrect integer value' if value < MIN_INT8 or value > MAX_INT8 [value].pack('c').bytes.each do |byte| buffer[from] = byte from += 1 end end
size()
click to toggle source
# File lib/exonum/types/primitive.rb, line 17 def self.size 1 end