Class: PhishDotNetClient::SongTransition

Inherits:
Object
  • Object
show all
Defined in:
lib/phish_dot_net_client/song_transition.rb

Overview

This class represents a transition between two songs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, from_song, to_song) ⇒ SongTransition

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SongTransition.

Parameters:

  • type (Symbol)

    the transition type

  • from_song (Song)

    the from song

  • to_song (Song)

    the to song



31
32
33
34
35
36
# File 'lib/phish_dot_net_client/song_transition.rb', line 31

def initialize(type, from_song, to_song)
  @type = type
  @from_song = from_song
  @to_song = to_song
  @from_song.post_transition = @to_song.pre_transition = self
end

Instance Attribute Details

#from_songObject (readonly)

Returns the value of attribute from_song.



20
21
22
# File 'lib/phish_dot_net_client/song_transition.rb', line 20

def from_song
  @from_song
end

#to_songObject (readonly)

Returns the value of attribute to_song.



24
25
26
# File 'lib/phish_dot_net_client/song_transition.rb', line 24

def to_song
  @to_song
end

#typeObject (readonly)

Returns the value of attribute type.



16
17
18
# File 'lib/phish_dot_net_client/song_transition.rb', line 16

def type
  @type
end