Sha256: 103bb7925ff6dd9e79dc118ca360382b923e5a7bbe9b333e4bf59922b7eee299

Contents?: true

Size: 709 Bytes

Versions: 4

Compression:

Stored size: 709 Bytes

Contents

require_relative "../config/environment.rb"
require "rap_songs/version"

module RapSongs
 class Song
 

  def random_song
   ["https://www.youtube.com/watch?v=ElOo0psAs3E",
    "https://www.youtube.com/watch?v=u7Fw8OHnJZM",
    "https://www.youtube.com/watch?v=mVFKMomXMOc",
    "https://www.youtube.com/watch?v=v5ybdpttu40",
    "https://www.youtube.com/watch?v=pmdI9YdLQ_o",
    "https://youtu.be/yL9bRzwk0Ds",
    "https://youtu.be/87VaeIKXV1s",
    "https://youtu.be/myrXQebr488",
    "https://www.youtube.com/watch?v=8UhshSef0zs",
    ].sample
  end

  def self.play
    song = Song.new
    song.open_in_browser
  end

  def open_in_browser
    Launchy.open(random_song)
  end

  # binding.pry
 end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rap_songs-0.7.9 lib/rap_songs.rb
rap_songs-0.7.8 lib/rap_songs.rb
rap_songs-0.7.7 lib/rap_songs.rb
rap_songs-0.7.6 lib/rap_songs.rb