holywarez-mpt 0.1.3.13 → 0.1.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +1 -0
- data/install_gem.bat +1 -1
- data/lib/event.rb +4 -3
- data/mpt.gemspec +1 -1
- metadata +1 -1
data/CHANGELOG
CHANGED
data/install_gem.bat
CHANGED
data/lib/event.rb
CHANGED
|
@@ -51,7 +51,6 @@ module MPT
|
|
|
51
51
|
container = MPT::EventContainer.new(object)
|
|
52
52
|
channel = @@mpt_subscribers[event_name]
|
|
53
53
|
if !channel.nil? && channel.size > 0
|
|
54
|
-
|
|
55
54
|
channel.each do |subscriber|
|
|
56
55
|
container.instance_eval_with_args( *args, &subscriber[:proc] )
|
|
57
56
|
end
|
|
@@ -93,8 +92,10 @@ class Class
|
|
|
93
92
|
|
|
94
93
|
def new_with_subscribe_support(*constructor_arguments)
|
|
95
94
|
instance = new_without_subscribe_support(*constructor_arguments)
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
@@event_subscribes.each_key do |event_name|
|
|
96
|
+
::MPT::Event.subscribe( event_name, :owner => instance ) do |*args|
|
|
97
|
+
instance.send( "trigger_event", event_name, *args )
|
|
98
|
+
end
|
|
98
99
|
end
|
|
99
100
|
instance
|
|
100
101
|
end
|
data/mpt.gemspec
CHANGED