Class: Analyst::Entities::MethodCall

Inherits:
Entity
  • Object
show all
Defined in:
lib/analyst/entities/method_call.rb

Instance Method Summary collapse

Instance Method Details

#argumentsObject



13
14
15
16
17
18
# File 'lib/analyst/entities/method_call.rb', line 13

def arguments
  @arguments ||= begin
    args = ast.children[2..-1]
    args.map { |arg| Analyst::Parser.process_node(arg, self) }
  end
end

#full_nameObject



9
10
11
# File 'lib/analyst/entities/method_call.rb', line 9

def full_name
  name
end

#nameObject



5
6
7
# File 'lib/analyst/entities/method_call.rb', line 5

def name
  name_node.to_s
end

#target_nodeObject

TODO: figure out how to resolve this to an Entity. we never want to expose the AST to the outside.



22
23
24
# File 'lib/analyst/entities/method_call.rb', line 22

def target_node
  ast.children.first
end