Project

General

Profile

Feature #8563

Updated by nobu (Nobuyoshi Nakada) almost 9 years ago

=begin 
 Often times, people want to assign given arguments to instance variables, especially inside the method `initialize`: 

 ~~~Ruby  
 

     def initialize foo, bar, buz 
   
       @foo, @bar, @buz = foo, bar, buz 
   
       ... 
 
     end 
 ~~~ 

 I propose to let method definition take instance variables as arguments so that: 

 ~~~Ruby  
 

     def initialize @foo, @bar, @buz 
   
       ... 
 
     end 
 ~~~ 

 would be equivalent as above. 
 =end 

Back