Sha256: 2468887c618883c8903cea68e6c0bcaf18f68a2c32d7103c18ee0f14b7b5dcca

Contents?: true

Size: 710 Bytes

Versions: 32

Compression:

Stored size: 710 Bytes

Contents

# frozen_string_literal: true

require 'eac_config/node'
require 'eac_templates/variables/providers/base'

module EacTemplates
  module Variables
    module Providers
      class ConfigReader < ::EacTemplates::Variables::Providers::Base
        class << self
          def accept?(variables_source)
            return false unless variables_source.respond_to?(:entry)

            entry = variables_source.entry(:any_value)
            entry.respond_to?(:value) && entry.respond_to?(:found?)
          end
        end

        def variable_exist?(name)
          source.entry(name).found?
        end

        def variable_fetch(name)
          source.entry(name).value
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
eac_templates-0.7.1 lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.93.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_templates-0.7.0 lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.91.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_templates-0.5.1 lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.76.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.75.2 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.75.1 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.75.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.74.1 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.74.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.73.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.72.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.70.1 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.70.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.69.1 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.69.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.68.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.67.1 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb
eac_tools-0.67.0 sub/eac_templates/lib/eac_templates/variables/providers/config_reader.rb