Class: Woods::FlowAnalysis::OperationExtractor
- Inherits:
-
Object
- Object
- Woods::FlowAnalysis::OperationExtractor
- Defined in:
- lib/woods/flow_analysis/operation_extractor.rb
Overview
Extracts operations from a method body AST in source line order.
Uses Ast::CallSiteExtractor for raw call sites, then classifies each into domain-meaningful operation types: calls, transactions, async enqueues, responses, conditionals, cycles, and dynamic dispatch.
Constant Summary collapse
- TRANSACTION_METHODS =
%w[transaction with_lock].freeze
- ASYNC_METHODS =
%w[perform_async perform_later perform_in perform_at].freeze
- RESPONSE_METHODS =
%w[redirect_to head respond_with].freeze
- DYNAMIC_DISPATCH_METHODS =
%w[send public_send].freeze
Instance Method Summary collapse
-
#extract(method_node) ⇒ Array<Hash>
Extract operations from a method definition node in source line order.
Instance Method Details
#extract(method_node) ⇒ Array<Hash>
Extract operations from a method definition node in source line order.
33 34 35 36 37 38 39 |
# File 'lib/woods/flow_analysis/operation_extractor.rb', line 33 def extract(method_node) return [] unless method_node.is_a?(Ast::Node) operations = [] walk(method_node, operations) operations end |