Class: Epubcheck::Ruby::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/epubcheck/ruby/cli.rb

Constant Summary collapse

JAR_FILE =
File.join(Epubcheck::Ruby::JAR_DIR, 'epubcheck-5.1.0/epubcheck.jar')

Instance Method Summary collapse

Constructor Details

#initializeCLI

Returns a new instance of CLI.



8
9
# File 'lib/epubcheck/ruby/cli.rb', line 8

def initialize
end

Instance Method Details

#execute(args) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/epubcheck/ruby/cli.rb', line 11

def execute(args)
  ret = system("java", "-jar", JAR_FILE, *args)
  if ret.nil?
    $stderr.write "Failed to execute epubcheck.\n"
    exit 1
  end
  ret
end