Class: TEALrb::Rewriters::Rewriter

Inherits:
Parser::TreeRewriter
  • Object
show all
Includes:
RuboCop::AST::Traversal
Defined in:
lib/tealrb/rewriters.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contractObject (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