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
eac_templates-0.3.2 lib/eac_templates/variable_providers/base.rb
avm-tools-0.129.0 sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.16.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.128.0 sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.15.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.14.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.13.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.127.0 sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.12.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.126.0 sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.11.1 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.125.0 sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.11.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.124.0 sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.10.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.123.0 sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.9.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb
avm-tools-0.122.0 sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.8.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb
eac_tools-0.7.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/base.rb