Class: Muwu::Viewer
Constant Summary
Constants included from Muwu
GEM_HOME_LIB, GEM_HOME_LIB_MUWU, VERSION
Instance Method Summary collapse
-
#initialize(project) ⇒ Viewer
constructor
A new instance of Viewer.
Methods included from Muwu
Constructor Details
#initialize(project) ⇒ Viewer
Returns a new instance of Viewer.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/muwu/viewer/viewer.rb', line 8 def initialize(project) document_home = project.manifest.find_document_html_by_index(0).filename document_home_path = File.join(project.path_compiled, document_home) if File.exists?(document_home_path) begin system "lynx #{document_home_path}", exception: true rescue Errno::ENOENT raise ProjectExceptionHandler::Fatal.new(ProjectException::LynxNotAvailable.new) end else puts "Compiled document not found: #{document_home_path}" end end |