Skip to content

Instantly share code, notes, and snippets.

@danielcooper
Created October 22, 2012 16:44
Show Gist options
  • Save danielcooper/3932446 to your computer and use it in GitHub Desktop.
Save danielcooper/3932446 to your computer and use it in GitHub Desktop.
class Person
attr_accessor :name
def initialize(name)
@name = name
end
end
class Employee < Person
attr_accessor :salary
def pay
"paid this months salary: £#{@salary}"
end
def drink_coffee
'glug glug'
end
end
class Developer < Employee
def make_bugs
"#{@name} does some typing"
end
end
class Tester < Employee
def test
"#{@name} does some testing"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment