Module: Yieldable::WaitMethodDefinition

Defined in:
lib/yieldable.rb

Instance Method Summary collapse

Instance Method Details

#singleton_method_added(id) ⇒ Object



73
74
75
76
77
78
79
80
81
82
83
# File 'lib/yieldable.rb', line 73

def singleton_method_added(id)
  if id == YieldableMixin.method_name
    begin
      Yieldable.set_proc(self, YieldableMixin)
    ensure
      singleton_class.remove_method(:singleton_method_added) if YieldableMixin.once
    end
  end

  super(id)
end