how do i access instance variable of one class into other class define in other file in ruby -


i have 1 file named class1.rb structure

module person   class amit     def initialize       @a=10     end   end  end 

another file named class2.rb

module person    class sumit < amit     def aos       puts "#{@a}"     end   end end 

i not able acess variable @a in sumit how do that??

you may have here(adding-an-instance-variable-to-a-class-in-ruby).


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -