Class: Hiera::Interpolate

### Home Classes Methods

### In Files

- lib/hiera/interpolate.rb

### Parent

Object

### Methods

- ::interpolate

### Class/Module Index

Quicksearch

- Hiera
- Hiera::Backend
- Hiera::Backend::Json_backend
- Hiera::Backend::Yaml_backend
- Hiera::Config
- Hiera::Console_logger
- Hiera::Error
- Hiera::FallbackLogger
- Hiera::Filecache
- Hiera::Interpolate
- Hiera::InterpolationLoop
- Hiera::InvalidConfigurationError
- Hiera::Noop_logger
- Hiera::Puppet_logger
- Hiera::RecursiveGuard
- Hiera::Util

No matching classes.

# Hiera::Interpolate

### Constants

INTERPOLATION
METHOD_INTERPOLATION

### Public Class Methods

interpolate(data, scope, extra_data) click to toggle source

    # File lib/hiera/interpolate.rb, line 9
    def interpolate(data, scope, extra_data)
      if data.is_a?(String)
        # Wrapping do_interpolation in a gsub block ensures we process
        # each interpolation site in isolation using separate recursion guards.
        data.gsub(INTERPOLATION) do |match|
          do_interpolation(match, Hiera::RecursiveGuard.new, scope, extra_data)
        end
      else
        data
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.