module Reek::AST::SexpExtensions::MethodNodeBase
Base module for utility methods for :def and :defs nodes.
Public Instance Methods
Source
# File lib/reek/ast/sexp_extensions/methods.rb, line 12 def arg_names arguments.map(&:name) end
Source
# File lib/reek/ast/sexp_extensions/methods.rb, line 8 def arguments parameters.reject(&:block?) end
Source
# File lib/reek/ast/sexp_extensions/methods.rb, line 32 def body_nodes(types, ignoring = []) return [] unless body return [] if ignoring.include?(body.type) body.each_node(types, ignoring | types) end
Source
# File lib/reek/ast/sexp_extensions/methods.rb, line 28 def ends_with_bang? name[-1] == '!' end
Source
# File lib/reek/ast/sexp_extensions/methods.rb, line 24 def name_without_bang name.to_s.chop end
Source
# File lib/reek/ast/sexp_extensions/methods.rb, line 20 def parameter_names parameters.map(&:name) end
Source
# File lib/reek/ast/sexp_extensions/methods.rb, line 16 def parameters argslist.components end