lib/ruby_tunes.rb in ruby_tunes-0.4.2 vs lib/ruby_tunes.rb in ruby_tunes-0.4.3
- old
+ new
@@ -1,14 +1,48 @@
-# Gems
-# require 'require_all'
require 'launchy'
require 'pry'
-# Local files
-require "./lib/ruby_tunes/country"
+module RubyTunes
+ $music = {
+ "rock" => ["https://youtu.be/ijGesPRut_o", "https://youtu.be/7Gr63DiEUxw", "https://youtu.be/Jesi67UJMVk", "https://youtu.be/tuHkNbk4nos", "https://youtu.be/J9jKQulDRCQ", "https://youtu.be/LE4u5qnJJj8", "https://youtu.be/55NJzOSuKuY"],
+ "country" => ["https://youtu.be/3pQc25SCaNs", "https://youtu.be/3A85JE2ugiI", "https://youtu.be/qcCH6JpcK5w", "https://youtu.be/23nlI9t4TlM", "https://youtu.be/XUH5FjUX3Qo", "https://youtu.be/P7kqqmr2HWI", "https://youtu.be/Vlhy7QPFohY"],
+ "rap" => ["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"]
+ }
-module RubyTunes
- binding.pry
-end
+ class Rock
+ def self.play
+ Rock.new.open_in_browser
+ end
+
+ def open_in_browser
+ Launchy.open($music["rock"].sample)
+ end
+ end
+
+
+ class Country
+ def self.play
+ Country.new.open_in_browser
+ end
+
+ def open_in_browser
+ Launchy.open($music["country"].sample)
+ end
+ end
+
+
+ class Rap
+ def self.play
+ Rap.new.open_in_browser
+ end
+
+ def open_in_browser
+ Launchy.open($music["rap"].sample)
+ end
+ end
+
+# binding.pry
+
+end