Class: MijDiscord::Data::InviteServer

Inherits:
Object
  • Object
show all
Includes:
IDObject
Defined in:
lib/mij-discord/data/invite.rb

Instance Attribute Summary collapse

Attributes included from IDObject

#id

Instance Method Summary collapse

Methods included from IDObject

#==, #creation_time, #hash, synthesize, timestamp

Constructor Details

#initialize(data, bot) ⇒ InviteServer

Returns a new instance of InviteServer.



31
32
33
34
35
36
37
# File 'lib/mij-discord/data/invite.rb', line 31

def initialize(data, bot)
  @bot = bot

  @id = data['id'].to_i
  @name = data['name']
  @splash_hash = data['splash_hash']
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



27
28
29
# File 'lib/mij-discord/data/invite.rb', line 27

def name
  @name
end

#splash_hashObject (readonly)

Returns the value of attribute splash_hash.



29
30
31
# File 'lib/mij-discord/data/invite.rb', line 29

def splash_hash
  @splash_hash
end

Instance Method Details

#inspectObject



39
40
41
# File 'lib/mij-discord/data/invite.rb', line 39

def inspect
  MijDiscord.make_inspect(self, :id, :name)
end