Skip to content

Instantly share code, notes, and snippets.

@csexton
Created June 20, 2015 15:21
Show Gist options
  • Save csexton/f4952241bd6081d33a71 to your computer and use it in GitHub Desktop.
Save csexton/f4952241bd6081d33a71 to your computer and use it in GitHub Desktop.
class Robot
def say(msg)
`say "#{msg}"`
self
end
def beep
say "beep boop bling beep bee"
end
def start
say "vroom I am starting up"
end
def lazer
say "pew pew pew"
3.times {puts}
80.times do
print "- "
sleep 0.5
end
print "BOOM!"
3.times {puts}
self
end
end
rob = Robot.new
rob.start.beep.lazer
@juliancheal
Copy link

👍 Lars!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment