Skip to content

Instantly share code, notes, and snippets.

@beaugaines
Created October 31, 2013 18:07
Show Gist options
  • Save beaugaines/7254216 to your computer and use it in GitHub Desktop.
Save beaugaines/7254216 to your computer and use it in GitHub Desktop.
class Shape
attr_accessor :color
def initialize(color="red")
@color = color
end
end
class Circle < Shape
attr_accessor :color, :radius
def initialize(radius, color="green")
super(color)
@radius = radius
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment