Sha256: 2c09f542993bd9cde7aa4115b74ab539780f1f354180e95aef45c53d85640f2d
Contents?: true
Size: 565 Bytes
Versions: 8
Compression:
Stored size: 565 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/core_ext' module EacTemplates module VariableProviders require_sub __FILE__ PROVIDERS = %w[entries_reader hash generic].map do |name| "eac_templates/variable_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
Version data entries
8 entries across 8 versions & 2 rubygems