Module: Reek::Source::SexpExtensions::SendNode

Defined in:
lib/reek/source/sexp_extensions.rb

Overview

Utility methods for :send nodes

Instance Method Summary collapse

Instance Method Details

#arg_namesObject


147
148
149
# File 'lib/reek/source/sexp_extensions.rb', line 147

def arg_names
  args.map { |arg| arg[1] }
end

#argsObject


141
# File 'lib/reek/source/sexp_extensions.rb', line 141

def args() self[3..-1] end

#method_nameObject


140
# File 'lib/reek/source/sexp_extensions.rb', line 140

def method_name() self[2] end

#participantsObject


143
144
145
# File 'lib/reek/source/sexp_extensions.rb', line 143

def participants
  ([receiver] + args).compact
end

#receiverObject


139
# File 'lib/reek/source/sexp_extensions.rb', line 139

def receiver() self[1] end