def interpolate(string, interops = {})
      interops = Hashie::Mash.new(interops)
      args = string.shellsplit

      args.map do |arg|
        arg.gsub(/(\{{1,2})([0-9a-zA-Z_\-.]+)(\}{1,2})/) do |m|
          if $1.length != $3.length
            next m
          end

          ops = interops
          parts = $2.split('.')
          parts.each do |part|
            if ops.key?(part)
              ops = ops[part]
            else
              ops = nil
              break
            end
          end

          if ops == nil
            m
          elsif $1.length == 1
            escape(ops)
          else
            ops
          end
        end
      end
    end
def interpolate(string, interops = {})
      interops = Hashie::Mash.new(interops)
      args = string.shellsplit

      args.map do |arg|
        arg.gsub(/(\{{1,2})([0-9a-zA-Z_\-.]+)(\}{1,2})/) do |m|
          if $1.length != $3.length
            next m
          end

          ops = interops
          parts = $2.split('.')
          parts.each do |part|
            if ops.key?(part)
              ops = ops[part]
            else
              ops = nil
              break
            end
          end

          if ops == nil
            m
          elsif $1.length == 1
            escape(ops)
          else
            ops
          end
        end
      end
    end
Interpolates the given string with the given interpolations.
 The keys of the interpolations should be alphanumeric,
 including underscores and dashes.  It will search the given
 string for +{key}+ and +{{key}}+; if it finds the former, it
 replaces it with the escaped value.  If it finds the latter, it
 replaces it with the value directly.

 @param string [String] the string to interpolate.
 @param interops [Hash] the interpolations to make.
 @return [Array<String>] the interpolated string.