Module: JavaTools

Defined in:
lib/java_tools.rb,
lib/java_tools/jar.rb,
lib/java_tools/javac.rb

Overview

:nodoc:

Defined Under Namespace

Classes: Jar, Javac

Class Method Summary collapse

Class Method Details

.configure_command(command, options) ⇒ Object

:nodoc:



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/java_tools.rb', line 18

def self.configure_command( command, options ) # :nodoc:
  options.each do |option, value|
    setter_name = "#{option}="
    
    if command.respond_to? setter_name
      command.send(setter_name, value)
    else
      raise ArgumentError, "Invalid option: #{option}"
    end
  end
end

.versionObject

:nodoc:



10
11
12
13
14
15
16
# File 'lib/java_tools.rb', line 10

def self.version # :nodoc:
  version_file = File.join(File.dirname(__FILE__), '..', 'VERSION')
  
  File.open(version_file) do |f|
    f.readline.strip
  end
end