Sha256: c3ec75e33bed821d8cf7a9411e30ebd9d8b39336d26e48367a146c6c1e2dec84

Contents?: true

Size: 1.95 KB

Versions: 2

Compression:

Stored size: 1.95 KB

Contents

require 'ostruct'

module AsciiPack
  TypeMap = OpenStruct.new({
    :int4              => 'a',
    :int8              => 'b',
    :int16             => 'c',
    :int32             => 'd',
    :int64             => 'e',
#   (blank)            => 'f',
    :uint8             => 'g',
    :uint16            => 'h',
    :uint32            => 'i',
    :uint64            => 'j',
    :float32           => 'k',
    :float64           => 'l',
#   (blank)            => 'm',
    :str8              => 'n',
    :str16             => 'o',
    :str32             => 'p',
#   (blank)            => 'q',
    :map4              => 'r',
    :map8              => 's',
    :map16             => 't',
    :map32             => 'u',
    :array4            => 'v',
    :array8            => 'w',
    :array16           => 'x',
    :array32           => 'y',
#   (blank)            => 'z',
    :positive_fixint_0 => '0',
    :positive_fixint_1 => '1',
    :positive_fixint_2 => '2',
    :positive_fixint_3 => '3',
    :positive_fixint_4 => '4',
    :positive_fixint_5 => '5',
    :positive_fixint_6 => '6',
    :positive_fixint_7 => '7',
    :positive_fixint_8 => '8',
    :positive_fixint_9 => '9',
    :positive_fixint_A => 'A',
    :positive_fixint_B => 'B',
    :positive_fixint_C => 'C',
    :positive_fixint_D => 'D',
    :positive_fixint_E => 'E',
    :positive_fixint_F => 'F',
    :fixstr_0          => 'G',
    :fixstr_1          => 'H',
    :fixstr_2          => 'I',
    :fixstr_3          => 'J',
    :fixstr_4          => 'K',
    :fixstr_5          => 'L',
    :fixstr_6          => 'M',
    :fixstr_7          => 'N',
    :fixstr_8          => 'O',
    :fixstr_9          => 'P',
    :fixstr_A          => 'Q',
    :fixstr_B          => 'R',
    :fixstr_C          => 'S',
    :fixstr_D          => 'T',
    :fixstr_E          => 'U',
    :fixstr_F          => 'V',
    :nil               => 'W',
    :false             => 'X',
    :true              => 'Y',
#   (blank)            => 'Z',
  })
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
asciipack-0.1.2 lib/asciipack/typemap.rb
asciipack-0.1.1 lib/asciipack/typemap.rb