Sha256: 278c2b6ad031752e5473fb03a68296922770693ce23e0933dffb18f4313ad756
Contents?: true
Size: 1.49 KB
Versions: 2
Compression:
Stored size: 1.49 KB
Contents
module Locomotive module Steam module Adapters module Filesystem module YAMLLoaders class Translation include Adapters::Filesystem::YAMLLoader def load(scope) super load_array end private def load_array [].tap do |array| _load(path).each do |key, values| array << { key: key.to_s, values: HashConverter.to_string(values) } end end end def path File.join(site_path, 'config', 'translations.yml') end end end end end end end # module Locomotive # module Steam # module Repositories # module Filesystem # module YAMLLoaders # class Translation < Struct.new(:root_path, :cache) # include YAMLLoaders::Concerns::Common # def list_of_attributes # cache.fetch('config/translations') { load_array } # end # private # def load_array # [].tap do |array| # load(path).each do |key, values| # array << { key: key.to_s, values: HashConverter.to_string(values) } # end # end # end # def path # File.join(root_path, 'config', 'translations.yml') # end # end # end # end # end # end # end
Version data entries
2 entries across 2 versions & 1 rubygems