Class: Jnlp::Property

Inherits:
Object
  • Object
show all
Defined in:
lib/jnlp/jnlp.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



89
90
91
92
93
94
# File 'lib/jnlp/jnlp.rb', line 89

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"


65
66
67
# File 'lib/jnlp/jnlp.rb', line 65

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"


83
84
85
# File 'lib/jnlp/jnlp.rb', line 83

def os
  @os
end

#propertyObject (readonly)

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



56
57
58
# File 'lib/jnlp/jnlp.rb', line 56

def property
  @property
end

#valueObject (readonly)

Contains the value of the Property

Example:

"all-otrunk-snapshot-0.1.0-20080310.211515"


74
75
76
# File 'lib/jnlp/jnlp.rb', line 74

def value
  @value
end