Class: Dokkit::Filter::YAML

Inherits:
Object
  • Object
show all
Defined in:
lib/dokkit/filters/yaml.rb

Instance Method Summary collapse

Constructor Details

#initialize(document) ⇒ YAML

Returns a new instance of YAML.



15
16
17
# File 'lib/dokkit/filters/yaml.rb', line 15

def initialize(document)
  @document = document
end

Instance Method Details

#filter(text) ⇒ Object



19
20
21
22
# File 'lib/dokkit/filters/yaml.rb', line 19

def filter(text)
  @document.configuration.recursive_merge! ::YAML::load(text)
  nil
end