Module Concrete
In: lib/concrete.rb

Include this module in an abstract class to make it concrete and so, to be able to instantiate it again. This module can be included if and only if the Abstract module has been included before in one of the class’ superclass.

Methods

included   is_a?   new  

Public Class methods

[Source]

# File lib/concrete.rb, line 9
  def self.included(klass)
    super
    unless klass.include?(Abstract)
      raise(TypeError, "#{klass} - not an abstract class")
    end
    klass.module_eval do
      class << self
        visibility = instance_method_visibility('new')
        def new(*args, &block)
          concrete_new(*args, &block)
        end
        send(visibility, :new)
      end

      def is_a?(klass)
        klass == Abstract ? false : super(klass)
      end
    end
  end

[Source]

# File lib/concrete.rb, line 17
        def new(*args, &block)
          concrete_new(*args, &block)
        end

Public Instance methods

[Source]

# File lib/concrete.rb, line 23
      def is_a?(klass)
        klass == Abstract ? false : super(klass)
      end

[Validate]