Class: RgGen::Core::InputBase::YAMLLoader::Visitor
- Inherits:
-
Psych::Visitors::ToRuby
- Object
- Psych::Visitors::ToRuby
- RgGen::Core::InputBase::YAMLLoader::Visitor
- Defined in:
- lib/rggen/core/input_base/yaml_loader.rb
Instance Method Summary collapse
- #accept(node) ⇒ Object
-
#initialize(scalar_scanner, class_loader) ⇒ Visitor
constructor
A new instance of Visitor.
Constructor Details
#initialize(scalar_scanner, class_loader) ⇒ Visitor
Returns a new instance of Visitor.
52 53 54 |
# File 'lib/rggen/core/input_base/yaml_loader.rb', line 52 def initialize(scalar_scanner, class_loader) super(scalar_scanner, class_loader, symbolize_names: true) end |
Instance Method Details
#accept(node) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/rggen/core/input_base/yaml_loader.rb', line 56 def accept(node) object = super if override_object?(node) file = node.filename line = node.start_line + 1 column = node.start_column + 1 InputValue.new(object, Position.new(file, line, column)) else object end end |