class Media::Movie
Attributes
format[RW]
title[RW]
Public Class Methods
new(title, format = nil)
click to toggle source
# File lib/media/runner/movie.rb, line 9 def initialize(title, format = nil) @title = title @format = format end
Public Instance Methods
run()
click to toggle source
# File lib/media/runner/movie.rb, line 16 def run vlc_installed? unless movie_exists?(self) Media::Printer.output ["#{movie_path(self)} doesn't exist. Did you type the movie name correctly?"] exit 1 end Media::Printer.output ["Playing movie #{title}. ENJOY!"] `zsh -c "#{Dir.home}/Applications/VLC.app/Contents/MacOS/VLC --fullscreen #{movie_path(self)} > /dev/null \ 2>&1 &!"` exit 0 end