Class: JarWrapper::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/jar_wrapper/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#classpathObject

Returns the value of attribute classpath.



16
17
18
# File 'lib/jar_wrapper/runner.rb', line 16

def classpath
  @classpath
end

#jar_fileObject

Returns the value of attribute jar_file.



16
17
18
# File 'lib/jar_wrapper/runner.rb', line 16

def jar_file
  @jar_file
end

#java_optsObject

Returns the value of attribute java_opts.



16
17
18
# File 'lib/jar_wrapper/runner.rb', line 16

def java_opts
  @java_opts
end

#main_classObject

Returns the value of attribute main_class.



16
17
18
# File 'lib/jar_wrapper/runner.rb', line 16

def main_class
  @main_class
end

Instance Method Details

#install(source, destination) ⇒ Object



18
19
20
21
22
# File 'lib/jar_wrapper/runner.rb', line 18

def install source, destination
  download_file_to(source, destination)

  unzip_file(destination) if destination =~ /\.zip$/
end

#run(args) ⇒ Object



24
25
26
27
28
# File 'lib/jar_wrapper/runner.rb', line 24

def run args
  construct_command(args) do |command|
    exec(command.join(" "))
  end
end