Class: Discordrb::ActivitySet
- Inherits:
-
Object
- Object
- Discordrb::ActivitySet
- Includes:
- Enumerable
- Defined in:
- lib/discordrb/data/activity.rb
Overview
A collection of the user's activities.
Instance Method Summary collapse
-
#custom_status ⇒ Array<Activity>
All activities of type Discordrb::Activity::CUSTOM.
-
#games ⇒ Array<Activity>
All activities of type Discordrb::Activity::GAME.
-
#listening ⇒ Array<Activity>
All activities of type Discordrb::Activity::LISTENING.
-
#streaming ⇒ Array<Activity>
All activities of type Discordrb::Activity::STREAMING.
-
#to_a ⇒ Array<Activity>
All activities.
-
#watching ⇒ Array<Activity>
All activities of type Discordrb::Activity::WATCHING.
Instance Method Details
#custom_status ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::CUSTOM.
260 261 262 |
# File 'lib/discordrb/data/activity.rb', line 260 def custom_status @activities.select { |act| act.type == Activity::CUSTOM } end |
#games ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::GAME.
240 241 242 |
# File 'lib/discordrb/data/activity.rb', line 240 def games @activities.select { |act| act.type == Activity::GAME } end |
#listening ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::LISTENING.
250 251 252 |
# File 'lib/discordrb/data/activity.rb', line 250 def listening @activities.select { |act| act.type == Activity::LISTENING } end |
#streaming ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::STREAMING.
245 246 247 |
# File 'lib/discordrb/data/activity.rb', line 245 def streaming @activities.select { |act| act.type == Activity::STREAMING } end |
#to_a ⇒ Array<Activity>
Returns all activities.
235 236 237 |
# File 'lib/discordrb/data/activity.rb', line 235 def to_a @activities end |
#watching ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::WATCHING.
255 256 257 |
# File 'lib/discordrb/data/activity.rb', line 255 def watching @activities.select { |act| act.type == Activity::WATCHING } end |