Class: SafeYAML::SafeToRubyVisitor
- Inherits:
-
Psych::Visitors::ToRuby
- Object
- Psych::Visitors::ToRuby
- SafeYAML::SafeToRubyVisitor
- Defined in:
- lib/safe_yaml/safe_to_ruby_visitor.rb
Instance Method Summary collapse
- #accept(node) ⇒ Object
-
#initialize(resolver) ⇒ SafeToRubyVisitor
constructor
A new instance of SafeToRubyVisitor.
Constructor Details
#initialize(resolver) ⇒ SafeToRubyVisitor
Returns a new instance of SafeToRubyVisitor.
3 4 5 6 |
# File 'lib/safe_yaml/safe_to_ruby_visitor.rb', line 3 def initialize(resolver) super() @resolver = resolver end |
Instance Method Details
#accept(node) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/safe_yaml/safe_to_ruby_visitor.rb', line 8 def accept(node) if node.tag SafeYAML.tag_safety_check!(node.tag, @resolver.) return super end @resolver.resolve_node(node) end |