Class: RaceGuard::IndexIntegrity::SchemaWalker
- Inherits:
-
Object
- Object
- RaceGuard::IndexIntegrity::SchemaWalker
- Defined in:
- lib/race_guard/index_integrity/schema_walker.rb
Overview
Internal: AST walk for SchemaAnalyzer (Epic 5.2).
Instance Method Summary collapse
-
#initialize(acc) ⇒ SchemaWalker
constructor
A new instance of SchemaWalker.
- #walk(node, table_ctx) ⇒ Object
Constructor Details
#initialize(acc) ⇒ SchemaWalker
Returns a new instance of SchemaWalker.
10 11 12 |
# File 'lib/race_guard/index_integrity/schema_walker.rb', line 10 def initialize(acc) @acc = acc end |
Instance Method Details
#walk(node, table_ctx) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/race_guard/index_integrity/schema_walker.rb', line 14 def walk(node, table_ctx) return unless node.is_a?(Parser::AST::Node) case node.type when :begin, :kwbegin walk_children(node, table_ctx) when :block walk_block(node, table_ctx) else record_send_indexes(node, table_ctx) walk_children(node, table_ctx) end end |