Class: TEALrb::Rewriters::Rewriter
- Inherits:
-
Parser::TreeRewriter
- Object
- Parser::TreeRewriter
- TEALrb::Rewriters::Rewriter
- Includes:
- RuboCop::AST::Traversal
- Defined in:
- lib/tealrb/rewriters.rb
Direct Known Subclasses
AssignRewriter, CommentRewriter, ComparisonRewriter, IfRewriter, InlineIfRewriter, MethodRewriter, OpRewriter, WhileRewriter
Instance Attribute Summary collapse
-
#contract ⇒ Object
readonly
Returns the value of attribute contract.
Instance Method Summary collapse
Instance Attribute Details
#contract ⇒ Object (readonly)
Returns the value of attribute contract.
7 8 9 |
# File 'lib/tealrb/rewriters.rb', line 7 def contract @contract end |
Instance Method Details
#rewrite(processed_source, contract) ⇒ Object
9 10 11 12 13 |
# File 'lib/tealrb/rewriters.rb', line 9 def rewrite(processed_source, contract) @comments = processed_source.comments @contract = contract super(processed_source.buffer, processed_source.ast) end |