Imitating Multiple Inheritance


#1



# Create your module here!
module MartialArts
    def swordsman
        puts "I'm a swordsman."
    end
end

class Ninja
include MartialArts
  def initialize(clan)
    @clan = clan
  end
end

class Samurai
include MaritalArts
  def initialize(shogun)
    @shogun = shogun
  end
end


Error: uninitialized constant Context::Samurai::MaritalArts


#2

you mispelled MartialArts on this line,


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.