Class Safemode::Parser
In: lib/safemode/parser.rb
Parent: Ruby2Ruby

Methods

Public Class methods

Public Instance methods

split up process_call. see below …

split up Ruby2Ruby#process_call monster method so we can hook into it in a more readable manner

Ruby2Ruby process_if rewrites if and unless statements in a way that makes the result unusable for evaluation in, e.g. ERB which appends a call to to_s when using <%= %> tags. We‘d need to either enclose the result from process_if into parentheses like (1 if true) and (true ? (1) : (2)) or just use the plain if-then-else-end syntax (so that ERB can safely append to_s to the resulting block).

[Validate]