Class: Exonum::SignatureT
- Inherits:
-
Object
- Object
- Exonum::SignatureT
- Defined in:
- lib/exonum/types/primitive.rb
Class Method Summary collapse
Class Method Details
.fixed? ⇒ Boolean
246 247 248 |
# File 'lib/exonum/types/primitive.rb', line 246 def self.fixed? true end |
.serialize(value, buffer, from, shift = 0) ⇒ Object
250 251 252 253 254 255 256 |
# File 'lib/exonum/types/primitive.rb', line 250 def self.serialize value, buffer, from, shift=0 raise "Expecting #{size} bytes in hex" unless value.is_a?(String) and value.length == size*2 [value].pack('H*').bytes.each do |byte| buffer[from] = byte from += 1 end end |
.size ⇒ Object
242 243 244 |
# File 'lib/exonum/types/primitive.rb', line 242 def self.size 64 end |