Class: Jnlp::J2se
- Inherits:
-
Object
- Object
- Jnlp::J2se
- Defined in:
- lib/jnlp/jnlp.rb
Instance Attribute Summary collapse
-
#arch ⇒ Object
readonly
Contains the value of the arch attribute in the parent <resources> element that contains this property if the attribute was set in the parent.The attribute is normalized by converting to lowercase and changing ‘ ’ characters to ‘_’.
-
#initial_heap_size ⇒ Object
readonly
Contains the initial-heap-size specified in the J2SE element:.
-
#j2se ⇒ Object
readonly
Contains the Hpricot element parsed from the orginal Jnlp that was used to create the Property.
-
#java_vm_args ⇒ Object
readonly
Contains the value of the optional java-vm-args attribute in in the J2SE element, the value is nil if not present:.
-
#max_heap_size ⇒ Object
readonly
Contains the max-heap-size specified in the J2SE element:.
-
#os ⇒ Object
readonly
Contains the value of the os attribute in the parent <resources> element that contains this property if the attribute was set in the parent.
-
#version ⇒ Object
readonly
Contains the version of the J2SE element:.
Instance Method Summary collapse
-
#initialize(j2se, os = nil, arch = nil) ⇒ J2se
constructor
Creates a new Jnlp::Property object.
Constructor Details
#initialize(j2se, os = nil, arch = nil) ⇒ J2se
Creates a new Jnlp::Property object.
-
prop: the Hpricot parsing of the specific jnlp/resources/property element
-
os: optional: include it if the resources parent element that contains the property has this attribute set
158 159 160 161 162 163 164 165 166 |
# File 'lib/jnlp/jnlp.rb', line 158 def initialize(j2se, os=nil, arch=nil) @j2se = j2se @version = j2se['version'] @max_heap_size = j2se['max-heap-size'] @initial_heap_size = j2se['initial-heap-size'] @java_vm_args = j2se['java-vm-args'] @os = os @arch = arch end |
Instance Attribute Details
#arch ⇒ Object (readonly)
Contains the value of the arch attribute in the parent <resources> element that contains this property if the attribute was set in the parent.The attribute is normalized by converting to lowercase and changing ‘ ’ characters to ‘_’
Examples:
"ppc i386" => "ppc_i386"
"x86_64" => "x86_64"
152 153 154 |
# File 'lib/jnlp/jnlp.rb', line 152 def arch @arch end |
#initial_heap_size ⇒ Object (readonly)
Contains the initial-heap-size specified in the J2SE element:
Example:
"32m"
120 121 122 |
# File 'lib/jnlp/jnlp.rb', line 120 def initial_heap_size @initial_heap_size end |
#j2se ⇒ Object (readonly)
Contains the Hpricot element parsed from the orginal Jnlp that was used to create the Property
96 97 98 |
# File 'lib/jnlp/jnlp.rb', line 96 def j2se @j2se end |
#java_vm_args ⇒ Object (readonly)
Contains the value of the optional java-vm-args attribute in in the J2SE element, the value is nil if not present:
Example:
"-d32"
129 130 131 |
# File 'lib/jnlp/jnlp.rb', line 129 def java_vm_args @java_vm_args end |
#max_heap_size ⇒ Object (readonly)
Contains the max-heap-size specified in the J2SE element:
Example:
"128m"
112 113 114 |
# File 'lib/jnlp/jnlp.rb', line 112 def max_heap_size @max_heap_size end |
#os ⇒ Object (readonly)
Contains the value of the os attribute in the parent <resources> element that contains this property if the attribute was set in the parent. The attribute is normalized by converting to lowercase and changing ‘ ’ characters to ‘_’
Example:
"Mac OS X" => "mac_os_x"
140 141 142 |
# File 'lib/jnlp/jnlp.rb', line 140 def os @os end |
#version ⇒ Object (readonly)
Contains the version of the J2SE element:
Example:
"1.5+"
104 105 106 |
# File 'lib/jnlp/jnlp.rb', line 104 def version @version end |