vendor/bundle/ruby/3.0.0/gems/brakeman-5.2.2/bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb
##
# Generate a post-or-pre conditional loop.
Generate a post-or-pre conditional loop.
Generate a post - or - pre conditional loop .
def cond_loop(exp, name)
    _, cond, body, head_controlled = exp
    cond = process cond
    body = process body
    body = indent(body).chomp if body
    code = []
    if head_controlled then
      code << "#{name} #{cond} do"
      code << body if body
      code << "end"
    else
      code << "begin"
      code << body if body
      code << "end #{name} #{cond}"
    end
    code.join("\n")
  end
def cond_loop ( exp , name ) _ , cond , body , head_controlled = exp cond = process cond body = process body body = indent ( body ) . chomp if body code = [ ] if head_controlled then code << "#{name} #{cond} do" code << body if body code << "end" else code << "begin" code << body if body code << "end #{name} #{cond}" end code . join ( "\n" ) end
Generate a post-or-pre conditional loop.
Generate a post - or - pre conditional loop .
exp
name