Sha256: f360cda2901c523d28cc0a1615fc45c6e77d7138d864d0a09f57480e0996d113

Contents?: true

Size: 439 Bytes

Versions: 76

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

require 'eac_templates/variable_not_found_error'

module EacTemplates
  module VariableProviders
    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

Version data entries

76 entries across 76 versions & 4 rubygems

Version Path
ehbrs-tools-0.28.0 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.106.0 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_templates-0.1.2 lib/eac_templates/variable_providers/base.rb
avm-tools-0.105.0 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.104.0 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.103.1 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_templates-0.1.1 lib/eac_templates/variable_providers/base.rb
avm-tools-0.103.0 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.102.2 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.102.1 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.102.0 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.101.0 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.100.0 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.99.1 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_templates-0.1.0 lib/eac_templates/variable_providers/base.rb
avm-tools-0.99.0 vendor/eac_templates/lib/eac_templates/variable_providers/base.rb