Sha256: d84f31452d520f9b99be32bf90b94b6f150dafdc9bb742e58171252519127f70

Contents?: true

Size: 658 Bytes

Versions: 1

Compression:

Stored size: 658 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.0 lib/rap_songs.rb