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



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

def self.create
  new({})
end

Instance Method Details

#register(target, obj) ⇒ Object

Noop this out so there are no anchors



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

def register(target, obj)
end

#visit_String(str) ⇒ Object



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

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