Class: Discordrb::Games::Game

Inherits:
Object
  • Object
show all
Defined in:
lib/discordrb/games.rb

Overview

A game Discord uses in the “Playing game” status

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Game

Returns a new instance of Game.



9
10
11
12
13
# File 'lib/discordrb/games.rb', line 9

def initialize(hash)
  @id = hash[:id]
  @name = hash[:name]
  @executables = hash[:executables]
end

Instance Attribute Details

#executablesObject (readonly)

Returns the value of attribute executables.



7
8
9
# File 'lib/discordrb/games.rb', line 7

def executables
  @executables
end

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/discordrb/games.rb', line 7

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/discordrb/games.rb', line 7

def name
  @name
end