lib/volay/config.rb in volay-1.0.0 vs lib/volay/config.rb in volay-1.0.1
- old
+ new
@@ -55,16 +55,12 @@
##
# Initialize mixer for controlling volume
#
def self.mixer
- @mixer ||= begin
- if which('amixer')
- Volay::Mixer::Alsa.new
- else
- fail MixerNotFound
- end
- end
+ raise MixerNotFound unless which('amixer')
+
+ @mixer ||= Volay::Mixer::Alsa.new
end
##
# Cross-platform way of finding an executable in the $PATH.
#