Class: Test02::UserCounter
- Inherits:
-
Object
- Object
- Test02::UserCounter
- Extended by:
- EventBus::BusMixin
- Defined in:
- lib/ls4/lib/ebus.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Instance Method Summary collapse
-
#initialize ⇒ UserCounter
constructor
A new instance of UserCounter.
- #on_add_user(uid) ⇒ Object
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
Constructor Details
#initialize ⇒ UserCounter
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
#count ⇒ Object (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 |