Class: RR::Creator

Inherits:
Object
  • Object
show all
Defined in:
lib/rr/creator.rb

Overview

RR::Creator is the superclass for all creators.

Instance Method Summary collapse

Constructor Details

#initialize(space, subject) {|_self| ... } ⇒ Creator

Returns a new instance of Creator.

Yields:

  • (_self)

Yield Parameters:

  • _self (RR::Creator)

    the object that the method was called on



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/rr/creator.rb', line 4

def initialize(space, subject, &block)
  @space = space
  @subject = subject
  class << self
    instance_methods.each do |m|
      undef_method m unless m =~ /^__/
    end
    include self::InstanceMethods
  end
  yield(self) if block_given?
end