Class: Unparser::Writer::Resbody

Inherits:
Object
  • Object
show all
Includes:
Unparser::Writer
Defined in:
lib/unparser/writer/resbody.rb

Overview

Writer for rescue bodies

Constant Summary

Constants included from Generation

Generation::EXTRA_NL

Instance Method Summary collapse

Methods included from Unparser::Writer

included

Methods included from Generation

#emit_heredoc_reminders, #symbol_name, #write_to_buffer

Methods included from NodeHelpers

#n, #n?, #s, #unwrap_single_begin

Instance Method Details

#emit_postcontrolObject



11
12
13
14
# File 'lib/unparser/writer/resbody.rb', line 11

def emit_postcontrol
  write(' rescue ')
  visit(body)
end

#emit_regularObject



16
17
18
19
20
21
# File 'lib/unparser/writer/resbody.rb', line 16

def emit_regular
  write('rescue')
  emit_exception
  emit_assignment
  emit_optional_body(body)
end