Class: JVMArgs::Standard

Inherits:
Object
  • Object
show all
Defined in:
lib/jvmargs/standard.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arg) ⇒ Standard

Returns a new instance of Standard.



7
8
9
10
11
# File 'lib/jvmargs/standard.rb', line 7

def initialize(arg)
  stripped = arg.sub(/^-/, '')
  @key = stripped 
  @value = true
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



5
6
7
# File 'lib/jvmargs/standard.rb', line 5

def key
  @key
end

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/jvmargs/standard.rb', line 5

def value
  @value
end

Instance Method Details

#to_sObject



13
14
15
16
17
18
19
# File 'lib/jvmargs/standard.rb', line 13

def to_s
  if @value
    "-#{@key}"
  else
    ""
  end
end