lib/kagu/playlists.rb in kagu-0.1.0 vs lib/kagu/playlists.rb in kagu-0.1.1
- old
+ new
@@ -5,10 +5,11 @@
include Enumerable
attr_reader :library
def initialize(library)
- @library = library.is_a?(Library) ? library : raise("#{self.class}#library must be a library, #{library.inspect} given")
+ raise ArgumentError.new("#{self.class}#library must be a library, #{library.inspect} given") unless library.is_a?(Library)
+ @library = library
end
def each(&block)
return unless block_given?
tracks = {}.tap do |tracks|