Class: Analyst::Entities::SingletonMethod

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

Instance Attribute Summary

Attributes inherited from Entity

#parent

Instance Method Summary collapse

Methods inherited from Entity

#classes, #handle_send_node, #initialize, #inspect, #method_calls, #top_level_classes, #top_level_modules

Constructor Details

This class inherits a constructor from Analyst::Entities::Entity

Instance Method Details

#full_nameObject



35
36
37
# File 'lib/analyst/entities/method.rb', line 35

def full_name
  parent.full_name + '::' + name
end

#nameObject



31
32
33
# File 'lib/analyst/entities/method.rb', line 31

def name
  ast.children[1].to_s
end

#targetObject

NOTE: not a public API – used by Entities::Class



26
27
28
29
# File 'lib/analyst/entities/method.rb', line 26

def target
  target, name, params, content = ast.children
  target
end