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