Class: Test01::UserCounter
- Inherits:
-
EventBus::Singleton
- Object
- EventBus::Singleton
- Test01::UserCounter
- 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::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
Constructor Details
#initialize ⇒ UserCounter
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
#count ⇒ Object (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 |