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



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

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"


59
60
61
# File 'lib/jnlp/jnlp.rb', line 59

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"


77
78
79
# File 'lib/jnlp/jnlp.rb', line 77

def os
  @os
end

#propertyObject (readonly)

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



50
51
52
# File 'lib/jnlp/jnlp.rb', line 50

def property
  @property
end

#valueObject (readonly)

Contains the value of the Property

Example:

"all-otrunk-snapshot-0.1.0-20080310.211515"


68
69
70
# File 'lib/jnlp/jnlp.rb', line 68

def value
  @value
end