programming-examples/ruby/_Basics/fighter.rb

24 lines
343 B
Ruby
Raw Normal View History

2019-11-15 12:59:38 +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