Class: Test01::UserCounter

Inherits:
EventBus::Singleton show all
Defined in:
lib/ls4/lib/ebus.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from EventBus::SingletonMixin

#ebus_bind!, #ebus_connect, extended

Methods included from EventBus::BusMixin

#ebus_all_slots, #ebus_disconnect!

Methods included from EventBus::DeclarerBase::Methods

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

Methods included from EventBus::DeclarerBase

#call_slot, #signal_slot

Constructor Details

#initializeUserCounter

Returns a new instance of UserCounter.



384
385
386
# File 'lib/ls4/lib/ebus.rb', line 384

def initialize
	@count = 0
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



392
393
394
# File 'lib/ls4/lib/ebus.rb', line 392

def count
  @count
end

Instance Method Details

#on_add_user(uid) ⇒ Object



388
389
390
# File 'lib/ls4/lib/ebus.rb', line 388

def on_add_user(uid)
	@count += 1
end