Method: Module#attr_accessor
- Defined in:
- lib/source/ruby.rb
#attr_accessor(*symbols) ⇒ Object
842 843 844 845 846 847 848 849 |
# File 'lib/source/ruby.rb', line 842 def attr_accessor(*symbols) `for(var i=0,l=symbols.length;i<l;++i){ var a=symbols[i].__value__; f1=this.prototype['m$'+a]=function(){return this['i$'+arguments.callee._name];};f1._name=a; f2=this.prototype['m$'+a+'_eql']=function(x){return this['i$'+arguments.callee._name]=x;};f2._name=a; }` return nil end |