Sha256: ad58df8f3d9c980c3c5bd2c07502255f36a6f15902c998113d76e49c285e8101

Contents?: true

Size: 547 Bytes

Versions: 76

Compression:

Stored size: 547 Bytes

Contents

# frozen_string_literal: true

require 'eac_templates/variable_providers/base'

module EacTemplates
  module VariableProviders
    class Hash < ::EacTemplates::VariableProviders::Base
      class << self
        def accept?(variables_source)
          variables_source.is_a?(::Hash)
        end
      end

      def initialize(source)
        super(source.with_indifferent_access)
      end

      def variable_exist?(name)
        source.key?(name)
      end

      def variable_fetch(name)
        source.fetch(name)
      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/hash.rb
avm-tools-0.129.0 sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.16.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
avm-tools-0.128.0 sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.15.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.14.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.13.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
avm-tools-0.127.0 sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.12.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
avm-tools-0.126.0 sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.11.1 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
avm-tools-0.125.0 sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.11.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
avm-tools-0.124.0 sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.10.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
avm-tools-0.123.0 sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.9.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
avm-tools-0.122.0 sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.8.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb
eac_tools-0.7.0 sub/avm-tools/sub/eac_templates/lib/eac_templates/variable_providers/hash.rb