Class: JavaOpts

Inherits:
Object
  • Object
show all
Defined in:
lib/jruby_art/java_opts.rb

Overview

class to parse java_args.txt or java_args in config.yml

Direct Known Subclasses

JRubyOpts

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeJavaOpts

Returns a new instance of JavaOpts.



6
7
8
9
10
11
12
# File 'lib/jruby_art/java_opts.rb', line 6

def initialize
  arg_file = File.join(SKETCH_ROOT, 'data/java_args.txt')
  @opts = []
  @opts += File.read(arg_file).split(/\s+/) if FileTest.exist?(arg_file)
  return unless opts.empty? && Processing::RP_CONFIG.fetch('java_args', false)
  @opts += Processing::RP_CONFIG['java_args'].split(/\s+/)
end

Instance Attribute Details

#optsObject (readonly)

Returns the value of attribute opts.



4
5
6
# File 'lib/jruby_art/java_opts.rb', line 4

def opts
  @opts
end