Class: RgGen::Core::InputBase::YAMLLoader::TreeBuilder
- Inherits:
-
Psych::TreeBuilder
- Object
- Psych::TreeBuilder
- RgGen::Core::InputBase::YAMLLoader::TreeBuilder
- Defined in:
- lib/rggen/core/input_base/yaml_loader.rb
Instance Method Summary collapse
-
#initialize(filename) ⇒ TreeBuilder
constructor
A new instance of TreeBuilder.
- #scalar(value, anchor, tag, plain, quated, style) ⇒ Object
- #set_start_location(node) ⇒ Object
Constructor Details
#initialize(filename) ⇒ TreeBuilder
Returns a new instance of TreeBuilder.
28 29 30 31 |
# File 'lib/rggen/core/input_base/yaml_loader.rb', line 28 def initialize(filename) super() @filename = filename end |
Instance Method Details
#scalar(value, anchor, tag, plain, quated, style) ⇒ Object
38 39 40 41 42 |
# File 'lib/rggen/core/input_base/yaml_loader.rb', line 38 def scalar(value, anchor, tag, plain, quated, style) node = super node.mapping_key = mapping_key? node end |
#set_start_location(node) ⇒ Object
33 34 35 36 |
# File 'lib/rggen/core/input_base/yaml_loader.rb', line 33 def set_start_location(node) super node.filename = @filename end |