Method: Psych::Visitors::YAMLTree#visit_Range

Defined in:
lib/psych/visitors/yaml_tree.rb

#visit_Range(o) ⇒ Object



371
372
373
374
375
376
377
# File 'lib/psych/visitors/yaml_tree.rb', line 371

def visit_Range o
  register o, @emitter.start_mapping(nil, '!ruby/range', false, Nodes::Mapping::BLOCK)
  ['begin', o.begin, 'end', o.end, 'excl', o.exclude_end?].each do |m|
    accept m
  end
  @emitter.end_mapping
end