Class: Discorb::AuditLog::Entry::Changes
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::AuditLog::Entry::Changes
- Defined in:
- lib/discorb/audit_logs.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) -> Discorb::AuditLog::Entry::Change?
Get a change with the given key.
- #inspect -> Object
-
#keys -> Array<Symbol>
Get keys of changes.
Methods inherited from DiscordModel
Instance Attribute Details
#data -> Object (readonly)
Returns the value of attribute data.
217 218 219 |
# File 'lib/discorb/audit_logs.rb', line 217 def data @data end |
Instance Method Details
#[](key) -> Discorb::AuditLog::Entry::Change?
Get a change with the given key.
250 251 252 |
# File 'lib/discorb/audit_logs.rb', line 250 def [](key) @data[key.to_sym] end |
#inspect -> Object
229 230 231 |
# File 'lib/discorb/audit_logs.rb', line 229 def inspect "#<#{self.class} #{@data.length} changes>" end |
#keys -> Array<Symbol>
Get keys of changes.
238 239 240 |
# File 'lib/discorb/audit_logs.rb', line 238 def keys @data.keys end |