Skip to content

Instantly share code, notes, and snippets.

@PavelPenkov
Last active December 26, 2015 02:59
Show Gist options
  • Select an option

  • Save PavelPenkov/7082987 to your computer and use it in GitHub Desktop.

Select an option

Save PavelPenkov/7082987 to your computer and use it in GitHub Desktop.
class Animal
@@name = 'Animal'
@name = 'Animal'
def self.get_name_wtf
@@name
end
def self.get_name_correct
@name
end
end
class Cat < Animal
@@name = 'Cat'
@name = 'Cat'
end
puts Animal.get_name_wtf # => 'Cat'
puts Animal.get_name_correct # => 'Animal'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment