Class: MijDiscord::Data::InviteChannel
- Inherits:
-
Object
- Object
- MijDiscord::Data::InviteChannel
- Includes:
- IDObject
- Defined in:
- lib/mij-discord/data/invite.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes included from IDObject
Instance Method Summary collapse
-
#initialize(data, bot) ⇒ InviteChannel
constructor
A new instance of InviteChannel.
- #inspect ⇒ Object
Methods included from IDObject
#==, #creation_time, #hash, synthesize, timestamp
Constructor Details
#initialize(data, bot) ⇒ InviteChannel
Returns a new instance of InviteChannel.
11 12 13 14 15 16 17 |
# File 'lib/mij-discord/data/invite.rb', line 11 def initialize(data, bot) @bot = bot @id = data['id'].to_i @name = data['name'] @type = data['type'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/mij-discord/data/invite.rb', line 7 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/mij-discord/data/invite.rb', line 9 def type @type end |
Instance Method Details
#inspect ⇒ Object
19 20 21 |
# File 'lib/mij-discord/data/invite.rb', line 19 def inspect MijDiscord.make_inspect(self, :id, :name, :type) end |