Module: Chat::User
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/chat/user.rb
Instance Method Summary collapse
Instance Method Details
#chat_avatar ⇒ Object
32 33 34 |
# File 'lib/chat/user.rb', line 32 def chat_avatar send(Chat.user_avatar) end |
#chat_avatar? ⇒ Boolean
36 37 38 |
# File 'lib/chat/user.rb', line 36 def chat_avatar? send("#{Chat.user_avatar}?") end |
#name ⇒ Object
20 21 22 |
# File 'lib/chat/user.rb', line 20 def name "#{first_name} #{last_name}" end |
#offline ⇒ Object
28 29 30 |
# File 'lib/chat/user.rb', line 28 def offline update(chat_status: "offline") end |
#online ⇒ Object
24 25 26 |
# File 'lib/chat/user.rb', line 24 def online update(chat_status: "online") end |