Module: EventBus::BusMixin

Includes:
DeclarerBase, DeclarerBase::Methods, SingleForwardable
Included in:
Bus, SingletonMixin, Test02::UserCounter
Defined in:
lib/ls4/lib/ebus.rb

Instance Method Summary collapse

Methods included from DeclarerBase::Methods

#connect, #ebus_call_log, #ebus_call_slots, #ebus_signal_error, #ebus_signal_log, #ebus_signal_slots

Methods included from DeclarerBase

#call_slot, #signal_slot

Instance Method Details

#ebus_all_slotsObject



207
208
209
210
211
212
213
214
215
# File 'lib/ls4/lib/ebus.rb', line 207

def ebus_all_slots
	slots = []
	constants.each {|const|
		if const.to_s =~ /^EBUS_SLOT_.*/
			slots << const_get(const)
		end
	}
	slots
end

#ebus_disconnect!Object



217
218
219
220
221
222
223
224
225
# File 'lib/ls4/lib/ebus.rb', line 217

def ebus_disconnect!
	constants.each {|const|
		if const.to_s =~ /^EBUS_SLOT_.*/
			slot = const_get(const)
			slot.disconnect!
		end
	}
	nil
end