Method: BERT::Decode#read_atom

Defined in:
lib/bert/decode.rb

#read_atomObject



96
97
98
99
100
101
102
103
104
105
106
# File 'lib/bert/decode.rb', line 96

def read_atom
  fail("Invalid Type, not an atom") unless read_1 == ATOM
  length = read_2
  a = read_string(length)
  case a
    when ""
      Marshal.load("\004\b:\005") # Workaround for inability to do ''.to_sym
    else
      a.to_sym
  end
end