Class: SafeYAML::PsychResolver

### Home Classes Methods

### In Files

- lib/safe_yaml/psych_resolver.rb

### Parent

Resolver

### Methods

- ::new
- #get_node_tag
- #get_node_type
- #get_node_value
- #native_resolve
- #resolve_alias
- #resolve_root
- #value_is_quoted?

### Class/Module Index

Quicksearch

- SafeYAML
- SafeYAML::Deep
- SafeYAML::Parse
- SafeYAML::Parse::Date
- SafeYAML::Parse::Hexadecimal
- SafeYAML::Parse::Sexagesimal
- SafeYAML::PsychHandler
- SafeYAML::PsychResolver
- SafeYAML::Resolver
- SafeYAML::SafeToRubyVisitor
- SafeYAML::SyckResolver
- SafeYAML::Transform
- SafeYAML::Transform::ToBoolean
- SafeYAML::Transform::ToDate
- SafeYAML::Transform::ToFloat
- SafeYAML::Transform::ToInteger
- SafeYAML::Transform::ToNil
- SafeYAML::Transform::ToSymbol
- SafeYAML::Transform::TransformationMap
- SafeYAML::Transform::TransformationMap::CaseAgnosticMap
- SafeYAML::Transform::TransformationMap::ClassMethods
- Object
- YAML

No matching classes.

# SafeYAML::PsychResolver

### Constants

NODE_TYPES

### Public Class Methods

new(options={}) click to toggle source

    # File lib/safe_yaml/psych_resolver.rb, line 11
    def initialize(options={})
      super
      @aliased_nodes = {}
    end

### Public Instance Methods

get_node_tag(node) click to toggle source

    # File lib/safe_yaml/psych_resolver.rb, line 33
    def get_node_tag(node)
      node.tag
    end

get_node_type(node) click to toggle source

    # File lib/safe_yaml/psych_resolver.rb, line 29
    def get_node_type(node)
      NODE_TYPES[node.class]
    end

get_node_value(node) click to toggle source

    # File lib/safe_yaml/psych_resolver.rb, line 37
    def get_node_value(node)
      @aliased_nodes[node.anchor] = node if node.respond_to?(:anchor) && node.anchor

      case get_node_type(node)
      when :root, :map, :seq
        node.children
      when :scalar
        node.value
      end
    end

native_resolve(node) click to toggle source

    # File lib/safe_yaml/psych_resolver.rb, line 24
    def native_resolve(node)
      @visitor ||= SafeYAML::SafeToRubyVisitor.new(self)
      @visitor.accept(node)
    end

resolve_alias(node) click to toggle source

    # File lib/safe_yaml/psych_resolver.rb, line 20
    def resolve_alias(node)
      resolve_node(@aliased_nodes[node.anchor])
    end

resolve_root(root) click to toggle source

    # File lib/safe_yaml/psych_resolver.rb, line 16
    def resolve_root(root)
      resolve_seq(root).first
    end

value_is_quoted?(node) click to toggle source

    # File lib/safe_yaml/psych_resolver.rb, line 48
    def value_is_quoted?(node)
      node.quoted
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.