Sha256: a1edea544f1f4f5fd01813959271811584f2b477174425cc50c2033d17756312

Contents?: true

Size: 209 Bytes

Versions: 1

Compression:

Stored size: 209 Bytes

Contents

module Renum
  class IndexSerializer
    def initialize enum_class
      @enum_class = enum_class
    end

    def dump v
      v && v.index
    end

    def load i
      i && @enum_class[i]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
renum-1.4.0 lib/renum/index_serializer.rb