Module: BERT

Defined in:
lib/bert/bert.rb,
lib/bert/types.rb,
lib/bert/decode.rb,
lib/bert/encode.rb,
lib/bert/decoder.rb,
lib/bert/encoder.rb

Defined Under Namespace

Modules: Types Classes: Decode, Decoder, Encode, Encoder, Tuple

Class Method Summary collapse

Class Method Details

.decode(bert) ⇒ Object



6
7
8
# File 'lib/bert/bert.rb', line 6

def self.decode(bert)
  Decoder.decode(bert)
end

.ebin(str) ⇒ Object



10
11
12
13
14
# File 'lib/bert/bert.rb', line 10

def self.ebin(str)
  bytes = []
  str.each_byte { |b| bytes << b.to_s }
  "<<" + bytes.join(',') + ">>"
end

.encode(ruby) ⇒ Object



2
3
4
# File 'lib/bert/bert.rb', line 2

def self.encode(ruby)
  Encoder.encode(ruby)
end