Class: RDG::Control::Def
- Inherits:
-
Object
- Object
- RDG::Control::Def
- Defined in:
- lib/rdg/control/def.rb
Instance Method Summary collapse
- #analyse ⇒ Object
-
#initialize(ast_node, graph, state) ⇒ Def
constructor
A new instance of Def.
Constructor Details
#initialize(ast_node, graph, state) ⇒ Def
4 5 6 7 |
# File 'lib/rdg/control/def.rb', line 4 def initialize(ast_node, graph, state) @graph, @state = graph, state @name, @args, @body = ast_node.children end |
Instance Method Details
#analyse ⇒ Object
9 10 11 12 |
# File 'lib/rdg/control/def.rb', line 9 def analyse @state[:current_method] = @name @graph.add_edge(@name, @body) end |