Sha256: 08803a9b79c896ee80314da80c6e7b4e35ebfbefb501bc7111790dd89a1f803e
Contents?: true
Size: 587 Bytes
Versions: 11
Compression:
Stored size: 587 Bytes
Contents
module Mobility module Backends =begin Defines read and write methods that access the value at a key with value +locale+ on a +translations+ hash. =end module HashValued # @!group Backend Accessors # # @!macro backend_reader def read(locale, _ = {}) translations[locale] end # @!macro backend_writer def write(locale, value, _ = {}) translations[locale] = value end # @!endgroup # @!macro backend_iterator def each_locale translations.each { |l, _| yield l } end end end end
Version data entries
11 entries across 11 versions & 1 rubygems