public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.