Class: Test02::UserService
- Inherits:
-
Object
- Object
- Test02::UserService
- Extended by:
- EventBus::SingletonMixin
- Defined in:
- lib/ls4/lib/ebus.rb
Instance Method Summary collapse
- #add(uid, name) ⇒ Object
- #added?(uid) ⇒ Boolean
- #get(uid) ⇒ Object
-
#initialize ⇒ UserService
constructor
A new instance of UserService.
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 ⇒ UserService
Returns a new instance of UserService.
428 429 430 |
# File 'lib/ls4/lib/ebus.rb', line 428 def initialize @db = {} end |
Instance Method Details
#add(uid, name) ⇒ Object
432 433 434 435 436 |
# File 'lib/ls4/lib/ebus.rb', line 432 def add(uid, name) @db[uid] = name Users.user_added(uid) name end |
#added?(uid) ⇒ Boolean
442 443 444 |
# File 'lib/ls4/lib/ebus.rb', line 442 def added?(uid) @db.has_key?(uid) end |
#get(uid) ⇒ Object
438 439 440 |
# File 'lib/ls4/lib/ebus.rb', line 438 def get(uid) @db[uid] end |