Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/resilience/core_ext.rb

Direct Known Subclasses

Resilience::Dirs, Resilience::Files

Instance Method Summary collapse

Instance Method Details

#big_endian_strObject



29
30
31
32
33
34
35
36
37
38
# File 'lib/resilience/core_ext.rb', line 29

def big_endian_str
  str = '0x'
  value = false
  reverse_each { |b|
    next if b == 0 && !value
    value = true
    str += b.to_s(16)
  }
  str
end