Class: Opal::Rewriters::ForRewriter::LocalVariableAssigns
- Inherits:
 - 
      Base
      
        
- Object
 - Parser::AST::Processor
 - Base
 - Opal::Rewriters::ForRewriter::LocalVariableAssigns
 
 
- Defined in:
 - opal/lib/opal/rewriters/for_rewriter.rb
 
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
- 
  
    
      #result  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute result.
 
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize  ⇒ LocalVariableAssigns 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of LocalVariableAssigns.
 - #on_lvasgn(node) ⇒ Object
 
Methods inherited from Base
#append_to_body, #begin_with_stmts, #error, #prepend_to_body, #process, #s, s, #stmts_of
Constructor Details
#initialize ⇒ LocalVariableAssigns
Returns a new instance of LocalVariableAssigns
      81 82 83  | 
    
      # File 'opal/lib/opal/rewriters/for_rewriter.rb', line 81 def initialize @result = Set.new end  | 
  
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result
      73 74 75  | 
    
      # File 'opal/lib/opal/rewriters/for_rewriter.rb', line 73 def result @result end  | 
  
Class Method Details
.find(node) ⇒ Object
      75 76 77 78 79  | 
    
      # File 'opal/lib/opal/rewriters/for_rewriter.rb', line 75 def self.find(node) processor = new processor.process(node) processor.result.to_a end  | 
  
Instance Method Details
#on_lvasgn(node) ⇒ Object
      85 86 87 88 89  | 
    
      # File 'opal/lib/opal/rewriters/for_rewriter.rb', line 85 def on_lvasgn(node) name, _ = *node result << name super end  |