Sha256: 6617e047f98ae73fcfcc8f3470f9ac915cd84c61bc7b5835a0a5a4ce4986e462
Contents?: true
Size: 368 Bytes
Versions: 8
Compression:
Stored size: 368 Bytes
Contents
module Danconia module Stores class InMemory attr_reader :rates def initialize rates: {} save_rates rates end # @rates should be of a map of pair->rate like {'USDEUR' => 1.25} def save_rates rates @rates = rates end def direct_rate from, to @rates[[from, to].join] end end end end
Version data entries
8 entries across 8 versions & 1 rubygems