class Discorb::Presence::ClientStatus
Represents a user's client status.
Attributes
desktop[R]
@return [Symbol] The desktop status of the user.
mobile[R]
@return [Symbol] The mobile status of the user.
web[R]
@return [Symbol] The web status of the user.
Public Class Methods
new(data)
click to toggle source
@!visibility private
# File lib/discorb/presence.rb, line 279 def initialize(data) @desktop = data[:desktop]&.to_sym || :offline @mobile = data[:mobile]&.to_sym || :offline @web = data[:web]&.to_sym || :offline end
Public Instance Methods
desktop?()
click to toggle source
# File lib/discorb/presence.rb, line 285 def desktop? @desktop != :offline end
mobile?()
click to toggle source
# File lib/discorb/presence.rb, line 289 def mobile? @mobile != :offline end
web?()
click to toggle source
# File lib/discorb/presence.rb, line 293 def web? @web != :offline end