Class: Octiron::World::TransmogrifierRegistrator Private

Inherits:
Object
  • Object
show all
Defined in:
lib/octiron/world.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Delegator for the on_transmogrify(FROM).to TO syntax

Direct Known Subclasses

AutoTransmogrifyDelegator

Instance Method Summary collapse

Constructor Details

#initialize(from) ⇒ TransmogrifierRegistrator

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of TransmogrifierRegistrator.



46
47
48
# File 'lib/octiron/world.rb', line 46

def initialize(from)
  @from = from
end

Instance Method Details

#to(to, transmogrifier_object = nil, &transmogrifier_proc) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



50
51
52
53
54
# File 'lib/octiron/world.rb', line 50

def to(to, transmogrifier_object = nil, &transmogrifier_proc)
  ::Octiron::World.transmogrifier_registry.register(@from, to, false,
                                                    transmogrifier_object,
                                                    &transmogrifier_proc)
end