# File lib/ripper_ruby_parser/sexp_handlers/methods.rb, line 66 def process_alias exp _, left, right = exp.shift 3 s(:alias, make_method_name_literal(left), make_method_name_literal(right)) end
# File lib/ripper_ruby_parser/sexp_handlers/methods.rb, line 4 def process_def exp _, ident, params, body = exp.shift 4 ident, pos = extract_node_symbol_with_position ident params = convert_special_args(process(params)) with_position(pos, s(:defn, ident, params, *method_body(body))) end
# File lib/ripper_ruby_parser/sexp_handlers/methods.rb, line 12 def process_defs exp _, receiver, _, method, params, body = exp.shift 6 params = convert_special_args(process(params)) body = in_method do process(body) end if body.length == 1 && body.first.sexp_type == :block body = body.first body.shift end s(:defs, process(receiver), extract_node_symbol(method), params, *body) end
# File lib/ripper_ruby_parser/sexp_handlers/methods.rb, line 31 def process_return exp _, arglist = exp.shift 2 s(:return, handle_return_argument_list(arglist)) end
# File lib/ripper_ruby_parser/sexp_handlers/methods.rb, line 36 def process_return0 exp _ = exp.shift s(:return) end
# File lib/ripper_ruby_parser/sexp_handlers/methods.rb, line 52 def process_undef exp _, args = exp.shift 2 args.map! do |sub_exp| s(:undef, make_method_name_literal(sub_exp)) end if args.size == 1 args[0] else s(:block, *args) end end
# File lib/ripper_ruby_parser/sexp_handlers/methods.rb, line 41 def process_yield exp _, arglist = exp.shift 2 arglist = process arglist s(:yield, *arglist[1..-1]) end
# File lib/ripper_ruby_parser/sexp_handlers/methods.rb, line 47 def process_yield0 exp _ = exp.shift s(:yield) end