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
-
#competing ⇒ Array<Activity>
All activities of type Discordrb::Activity::COMPETING.
-
#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
#competing ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::COMPETING.
267 268 269 |
# File 'lib/discordrb/data/activity.rb', line 267 def competing @activities.select { |act| act.type == Activity::COMPETING } end |
#custom_status ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::CUSTOM.
262 263 264 |
# File 'lib/discordrb/data/activity.rb', line 262 def custom_status @activities.select { |act| act.type == Activity::CUSTOM } end |
#games ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::GAME.
242 243 244 |
# File 'lib/discordrb/data/activity.rb', line 242 def games @activities.select { |act| act.type == Activity::GAME } end |
#listening ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::LISTENING.
252 253 254 |
# File 'lib/discordrb/data/activity.rb', line 252 def listening @activities.select { |act| act.type == Activity::LISTENING } end |
#streaming ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::STREAMING.
247 248 249 |
# File 'lib/discordrb/data/activity.rb', line 247 def streaming @activities.select { |act| act.type == Activity::STREAMING } end |
#to_a ⇒ Array<Activity>
Returns all activities.
237 238 239 |
# File 'lib/discordrb/data/activity.rb', line 237 def to_a @activities end |
#watching ⇒ Array<Activity>
Returns all activities of type Discordrb::Activity::WATCHING.
257 258 259 |
# File 'lib/discordrb/data/activity.rb', line 257 def watching @activities.select { |act| act.type == Activity::WATCHING } end |