module Antwrap::AntwrapClassLoader
Public Class Methods
load_ant_libs(ant_home)
click to toggle source
# File lib/antwrap_utilities.rb, line 24 def load_ant_libs(ant_home) jars = match(ant_home + File::SEPARATOR + 'lib') {|p| ext = p[-4...p.size]; ext && ext.downcase == '.jar'} Antwrap::JavaAdapter.load(jars) end
match(*paths) { |path| ... }
click to toggle source
# File lib/antwrap_utilities.rb, line 18 def match(*paths) matched = Array.new Find.find(*paths){ |path| matched << path if yield path } return matched end
Private Instance Methods
load_ant_libs(ant_home)
click to toggle source
# File lib/antwrap_utilities.rb, line 24 def load_ant_libs(ant_home) jars = match(ant_home + File::SEPARATOR + 'lib') {|p| ext = p[-4...p.size]; ext && ext.downcase == '.jar'} Antwrap::JavaAdapter.load(jars) end
match(*paths) { |path| ... }
click to toggle source
# File lib/antwrap_utilities.rb, line 18 def match(*paths) matched = Array.new Find.find(*paths){ |path| matched << path if yield path } return matched end