Class: Gem::NoAliasYAMLTree

Inherits:
Psych::Visitors::YAMLTree
  • Object
show all
Defined in:
lib/rubygems/psych_tree.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.createObject



6
7
8
# File 'lib/rubygems/psych_tree.rb', line 6

def self.create
  new({})
end

Instance Method Details

#register(target, obj) ⇒ Object

Noop this out so there are no anchors



18
19
# File 'lib/rubygems/psych_tree.rb', line 18

def register(target, obj)
end

#visit_String(str) ⇒ Object



10
11
12
13
14
15
# File 'lib/rubygems/psych_tree.rb', line 10

def visit_String(str)
  return super unless str == '=' # or whatever you want

  quote = Psych::Nodes::Scalar::SINGLE_QUOTED
  @emitter.scalar str, nil, nil, false, true, quote
end