class Openfire::SystemProperty

Attributes

key[RW]
value[RW]

Public Class Methods

new(attributes={}) click to toggle source
# File lib/openfire/system_property.rb, line 5
def initialize(attributes={})
  attributes.each do |k,v|
    self.send("#{to_underscore(k).gsub('@','')}=", v)
  end
end

Private Instance Methods

to_underscore(val) click to toggle source
# File lib/openfire/system_property.rb, line 13
def to_underscore(val)
  val.gsub(/::/, '/').
  gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
  gsub(/([a-z\d])([A-Z])/,'\1_\2').
  tr("-", "_").
  downcase
end