Class: Jnlp::Property

Inherits:
Object
  • Object
show all
Defined in:
lib/jnlp/property.rb

Overview

Property objects encapsulate <property> elements present in a Java Web Start Jnlp <resources> element.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prop, os = nil) ⇒ Property

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



44
45
46
47
48
49
# File 'lib/jnlp/property.rb', line 44

def initialize(prop, os=nil)
  @property = prop
  @name = prop['name']
  @value = prop['value']
  @os = os
end

Instance Attribute Details

#nameObject (readonly)

Contains the name of the Property

Example:

"maven.jnlp.version"


20
21
22
# File 'lib/jnlp/property.rb', line 20

def name
  @name
end

#osObject (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. Example:

"Mac OS X"


38
39
40
# File 'lib/jnlp/property.rb', line 38

def os
  @os
end

#propertyObject (readonly)

Contains the Hpricot element parsed from the orginal Jnlp that was used to create the Property



11
12
13
# File 'lib/jnlp/property.rb', line 11

def property
  @property
end

#valueObject (readonly)

Contains the value of the Property

Example:

"all-otrunk-snapshot-0.1.0-20080310.211515"


29
30
31
# File 'lib/jnlp/property.rb', line 29

def value
  @value
end