class Wiris::PropertiesTools

Public Class Methods

fromProperties(prop) click to toggle source
# File lib/src-generic/PropertiesTools.rb, line 29
 def self.fromProperties(prop)
    return prop
end
getProperty(prop, key, dflt=nil) click to toggle source
# File lib/src-generic/PropertiesTools.rb, line 3
def self.getProperty(prop, key, dflt=nil)
        if (!prop[key].nil?)
                return prop[key]
        else
                return dflt
        end
end
newProperties() click to toggle source
# File lib/src-generic/PropertiesTools.rb, line 15
def self.newProperties()
        return Hash.new()
end
setProperty(prop, key, value) click to toggle source
# File lib/src-generic/PropertiesTools.rb, line 11
def self.setProperty(prop, key, value)
        prop[key] = value
end
toProperties(hashString) click to toggle source
# File lib/src-generic/PropertiesTools.rb, line 19
    def self.toProperties(hashString)
    p = Hash.new()
    keys = hashString.keys()
    while keys.hasNext()
           key = keys.next()
           p[key] = hashString.get(key)
    end
    return p
end