Sha256: 8bd689f3b72a0aedb2270cb389c2c4f7d6e37deef57d6a8f5d3512231112a316
Contents?: true
Size: 729 Bytes
Versions: 2
Compression:
Stored size: 729 Bytes
Contents
module AsciiPack class TypeMap class << self { :int4 => 'a', :int8 => 'b', :int16 => 'c', :int32 => 'd', :int64 => 'e', :uint4 => 'f', :uint8 => 'g', :uint16 => 'h', :uint32 => 'i', :uint64 => 'j', :float32 => 'k', :float64 => 'l', :str4 => 'm', :str8 => 'n', :str16 => 'o', :str32 => 'p', :map => 'q', :array => 'r', :nil => 's', :false => 't', :true => 'u', }.each { |name, char| module_eval %{ def #{name} "#{char}" end } } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asciipack-0.0.2 | lib/asciipack/typemap.rb |
asciipack-0.0.1 | lib/asciipack/typemap.rb |