Class: Foo

Inherits:
Object
  • Object
show all
Defined in:
lib/test.rb

Class Method Summary collapse

Class Method Details

.helloObject



8
9
10
# File 'lib/test.rb', line 8

def self.hello
  @hello
end

.inherited(subclass) ⇒ Object



4
5
6
# File 'lib/test.rb', line 4

def self.inherited(subclass)
  subclass.instance_variable_set( :@hello, self.instance_variable_get(:@hello).dup )
end