Sha256: c93e34dc0095f67566e8b6f0fb727d78bbc90f4751069561f7ebb92bf82a4f92
Contents?: true
Size: 625 Bytes
Versions: 32
Compression:
Stored size: 625 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/core_ext' module EacTemplates module Variables module Providers require_sub __FILE__ PROVIDERS = %w[config_reader entries_reader hash generic].map do |name| "eac_templates/variables/providers/#{name}".camelize.constantize end class << self def build(variables_source) PROVIDERS.each do |provider| return provider.new(variables_source) if provider.accept?(variables_source) end raise "Variables provider not found for #{variables_source}" end end end end end
Version data entries
32 entries across 32 versions & 2 rubygems