Class: Caldera::Events::TrackEnd

Inherits:
Object
  • Object
show all
Defined in:
lib/caldera/events.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, player) ⇒ TrackEnd

Returns a new instance of TrackEnd.



19
20
21
22
23
24
# File 'lib/caldera/events.rb', line 19

def initialize(data, player)
  @player = player
  @reason = data['reason'].to_sym
  @guild_id = data['guildId']
  @track = Caldera::Model::Track.from_b64(data['track'])
end

Instance Attribute Details

#guild_idObject (readonly)

Returns the value of attribute guild_id.



17
18
19
# File 'lib/caldera/events.rb', line 17

def guild_id
  @guild_id
end

#playerObject (readonly)

Returns the value of attribute player.



17
18
19
# File 'lib/caldera/events.rb', line 17

def player
  @player
end

#reasonObject (readonly)

Returns the value of attribute reason.



17
18
19
# File 'lib/caldera/events.rb', line 17

def reason
  @reason
end

#trackObject (readonly)

Returns the value of attribute track.



17
18
19
# File 'lib/caldera/events.rb', line 17

def track
  @track
end