Inheriting Constants inside a Ruby module
===

In Ruby, I'm trying to create a class, which based on a value given during initialization will inherit from one of the following classes. I would like to make a base module that both these modules inherit from that contain common methods that use constants defined in the modules that inherit it. Example:

    module BaseMod
      def what_am_i
        puts OUTPUT
      end
    end
    
    module Tall
      OUTPUT = "I am tall"
      include BaseMod
    end
    
    module Short
      OUTPUT = "I am short"
      include BaseMod
    end
    
    class Person
      def initialize type
        if type =~ /short/i
          extend Short
        else
          extend Tall
        end
      end
    end
    
    p = Person.new "short"
    p.what_am_i

My issue is that when "p.what_am_i" is called I get the following error:

    NameError: uninitialized constant BaseMod::OUTPUT
      const_missing at org/jruby/RubyModule.java:2642
          what_am_i at test_logic2.rb:3
             (root) at test_logic2.rb:28