programming-examples/ruby/Basics/fighter.rb

24 lines
343 B
Ruby
Raw Normal View History

2019-11-18 14:44:36 +01:00
require "logger"
require_relative "mixins"
module Logging
# Provided for your convenience
def logger
Logging.logger
end
def self.logger
@logger ||= Logger.new(STDOUT)
end
end
class Fighter
# Your code goes here
end
fighter = Fighter.new("Bruce Lee")
fighter.uppercut
fighter.block
fighter.riposte
fighter.straight_kick