Class: Test02::UserCounter

Inherits:
Object
  • Object
show all
Extended by:
EventBus::BusMixin
Defined in:
lib/ls4/lib/ebus.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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.



452
453
454
# File 'lib/ls4/lib/ebus.rb', line 452

def initialize
	@count = 0
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



460
461
462
# File 'lib/ls4/lib/ebus.rb', line 460

def count
  @count
end

Instance Method Details

#on_add_user(uid) ⇒ Object



456
457
458
# File 'lib/ls4/lib/ebus.rb', line 456

def on_add_user(uid)
	@count += 1
end