Skip to content

Instantly share code, notes, and snippets.

@ssaadh
Created November 4, 2013 18:45
Show Gist options
  • Save ssaadh/7307314 to your computer and use it in GitHub Desktop.
Save ssaadh/7307314 to your computer and use it in GitHub Desktop.
Just my own testing of Ruby classes, objects and how they go together, inheritance, etc.
class AParent
attr_reader :hello
end
class Outer
attr_reader :inner
def initialize( inner )
@inner = inner
end
def lol
'lulz'
end
end
class Inner < AParent
def hi
'there'
end
end
inner = Inner.new
outer = Outer.new inner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment