Created
October 22, 2012 16:44
-
-
Save danielcooper/3932446 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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