Class: OnyxCord::SearchedMessages
- Inherits:
-
Object
- Object
- OnyxCord::SearchedMessages
- Includes:
- Enumerable
- Defined in:
- lib/onyxcord/models/server.rb
Overview
A set of messages collected from a search query.
Instance Attribute Summary collapse
-
#messages ⇒ Array<Message>
readonly
The messages that matched the search query.
-
#total_results ⇒ Integer
readonly
The total number of messages that matched the search query.
Instance Method Summary collapse
-
#[](index) ⇒ Message
Get a single message that matched the search query by its index.
-
#each ⇒ Array<Message>, Enumerable
Iterate over each message that matched the search query.
Instance Attribute Details
#messages ⇒ Array<Message> (readonly)
Returns the messages that matched the search query.
1598 1599 1600 |
# File 'lib/onyxcord/models/server.rb', line 1598 def @messages end |
#total_results ⇒ Integer (readonly)
Returns the total number of messages that matched the search query.
1601 1602 1603 |
# File 'lib/onyxcord/models/server.rb', line 1601 def total_results @total_results end |
Instance Method Details
#[](index) ⇒ Message
Get a single message that matched the search query by its index.
1613 1614 1615 |
# File 'lib/onyxcord/models/server.rb', line 1613 def [](index) @messages[index] end |
#each ⇒ Array<Message>, Enumerable
Iterate over each message that matched the search query.
1619 1620 1621 |
# File 'lib/onyxcord/models/server.rb', line 1619 def each(...) @messages.each(...) end |