Class: DeadCodeTerminator::Ast
- Inherits:
-
Object
- Object
- DeadCodeTerminator::Ast
- Defined in:
- lib/dead_code_terminator/ast.rb
Instance Attribute Summary collapse
-
#ast ⇒ Object
readonly
Returns the value of attribute ast.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
-
#initialize(env:, ast:) ⇒ Ast
constructor
A new instance of Ast.
- #process ⇒ Object
Constructor Details
#initialize(env:, ast:) ⇒ Ast
Returns a new instance of Ast.
7 8 9 10 |
# File 'lib/dead_code_terminator/ast.rb', line 7 def initialize(env:, ast:) @env = env @ast = ast end |
Instance Attribute Details
#ast ⇒ Object (readonly)
Returns the value of attribute ast.
5 6 7 |
# File 'lib/dead_code_terminator/ast.rb', line 5 def ast @ast end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
5 6 7 |
# File 'lib/dead_code_terminator/ast.rb', line 5 def env @env end |
Instance Method Details
#process ⇒ Object
12 13 14 15 16 |
# File 'lib/dead_code_terminator/ast.rb', line 12 def process erase_before! erase_after! rewriter.process end |