Class: ImproveYourCode::AST::ReferenceCollector
- Inherits:
-
Object
- Object
- ImproveYourCode::AST::ReferenceCollector
- Defined in:
- lib/improve_your_code/ast/reference_collector.rb
Instance Method Summary collapse
-
#initialize(ast) ⇒ ReferenceCollector
constructor
A new instance of ReferenceCollector.
- #num_refs_to_self ⇒ Object
Constructor Details
#initialize(ast) ⇒ ReferenceCollector
Returns a new instance of ReferenceCollector.
6 7 8 |
# File 'lib/improve_your_code/ast/reference_collector.rb', line 6 def initialize(ast) @ast = ast end |
Instance Method Details
#num_refs_to_self ⇒ Object
10 11 12 |
# File 'lib/improve_your_code/ast/reference_collector.rb', line 10 def num_refs_to_self (explicit_self_calls + implicit_self_calls).size end |