Sha256: 987f34830650b70b0a17d4edd14f88b62ff5f3369a7e50dda76876cbe1382f75

Contents?: true

Size: 660 Bytes

Versions: 1

Compression:

Stored size: 660 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",
    ].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

1 entries across 1 versions & 1 rubygems

Version Path
rap_songs-0.7.5 lib/rap_songs.rb