Class: JVMArgs::Standard
- Inherits:
-
Object
- Object
- JVMArgs::Standard
- Defined in:
- lib/jvmargs/standard.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(arg) ⇒ Standard
constructor
A new instance of Standard.
- #to_s ⇒ Object
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
#key ⇒ Object
Returns the value of attribute key.
5 6 7 |
# File 'lib/jvmargs/standard.rb', line 5 def key @key end |
#value ⇒ Object
Returns the value of attribute value.
5 6 7 |
# File 'lib/jvmargs/standard.rb', line 5 def value @value end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/jvmargs/standard.rb', line 13 def to_s if @value "-#{@key}" else "" end end |