Sha256: 5562b3fcc860c438e140700502faf6ba844313784e5abaa3c45f56789869d1eb
Contents?: true
Size: 580 Bytes
Versions: 8
Compression:
Stored size: 580 Bytes
Contents
# frozen_string_literal: true require 'quby/table_backend/range_tree' module Quby class LookupTable attr_accessor :key def initialize(key) @key = key end def backing return @backing if @backing.present? all_data = data headers = all_data.shift compare = all_data.shift @backing = Quby::TableBackend::RangeTree.from_csv(levels: headers, compare: compare, data: all_data) end def lookup(parameters) backing.lookup(parameters) end def data Quby.lookup_table_repo.retrieve(key) end end end
Version data entries
8 entries across 8 versions & 1 rubygems