Sha256: f51865942b3afdcde93803cde5071bab5c330dd19c9fa98b3fbc69a0fd817cc1

Contents?: true

Size: 481 Bytes

Versions: 27

Compression:

Stored size: 481 Bytes

Contents

# frozen_string_literal: true

require 'eac_templates/variables/not_found_error'

module EacTemplates
  module Variables
    module Providers
      class Base
        attr_reader :source

        def initialize(source)
          @source = source
        end

        def variable_value(name)
          return variable_fetch(name) if variable_exist?(name)

          raise VariableNotFoundError, "Variable \"#{name}\" not found in #{source}"
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
eac_tools-0.76.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.75.2 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.75.1 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.75.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.74.1 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.74.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.73.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.72.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.70.1 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.70.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.69.1 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.69.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.68.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.67.1 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.67.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.66.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.65.1 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.65.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.64.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb
eac_tools-0.63.0 sub/eac_templates/lib/eac_templates/variables/providers/base.rb