Class: RubyCord::Guild::AuditLog::Entry::Changes
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- RubyCord::Guild::AuditLog::Entry::Changes
- Defined in:
- lib/rubycord/guild/audit_log/entry.rb
Overview
Represents the changes in an audit log entry.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#[](key) ⇒ RubyCord::Guild::AuditLog::Entry::Change?
Get a change with the given key.
-
#inspect ⇒ String
Formats the changes into a string.
-
#keys ⇒ Array<Symbol>
Get keys of changes.
Methods inherited from DiscordModel
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
218 219 220 |
# File 'lib/rubycord/guild/audit_log/entry.rb', line 218 def data @data end |
Instance Method Details
#[](key) ⇒ RubyCord::Guild::AuditLog::Entry::Change?
Get a change with the given key.
255 256 257 |
# File 'lib/rubycord/guild/audit_log/entry.rb', line 255 def [](key) @data[key.to_sym] end |
#inspect ⇒ String
Returns Formats the changes into a string.
234 235 236 |
# File 'lib/rubycord/guild/audit_log/entry.rb', line 234 def inspect "#<#{self.class} #{@data.length} changes>" end |
#keys ⇒ Array<Symbol>
Get keys of changes.
243 244 245 |
# File 'lib/rubycord/guild/audit_log/entry.rb', line 243 def keys @data.keys end |