Class: Vaml::ConfigHandler

Inherits:
Psych::TreeBuilder
  • Object
show all
Defined in:
lib/vaml/config_handler.rb

Instance Method Summary collapse

Instance Method Details

#scalar(value, anchor, tag, plain, quoted, style) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/vaml/config_handler.rb', line 3

def scalar value, anchor, tag, plain, quoted, style
  vault_regex = /vault:/
  translated = if value.match(vault_regex)
    query = value.gsub(vault_regex, '')
    Vaml.read_string(query)
  else
    value
  end
  super translated, anchor, tag, plain, quoted, style
end