class Player::Base

Public Class Methods

init() click to toggle source
# File lib/remme/player/base.rb, line 4
def init
  self.tap do
    @adapter = adapter
    @was_playing = adapter.being_played?
  end
end
pause() click to toggle source
# File lib/remme/player/base.rb, line 11
def pause
  return if !@was_playing
  @adapter.pause
end
play() click to toggle source
# File lib/remme/player/base.rb, line 16
def play
  return if !@was_playing
  @adapter.play
end

Private Class Methods

adapter() click to toggle source
# File lib/remme/player/base.rb, line 23
def adapter
  Adapters::Spotify
end