Class: ConfigXmlClass
- Inherits:
-
ConfigClass
- Object
- Hash
- ConfigClass
- ConfigXmlClass
- Defined in:
- lib/buzzcore/config.rb
Instance Attribute Summary collapse
-
#xmlRoot ⇒ Object
Returns the value of attribute xmlRoot.
Attributes inherited from ConfigClass
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(aDefaultValues, aConfig) ⇒ ConfigXmlClass
constructor
A new instance of ConfigXmlClass.
Methods inherited from ConfigClass
#copy_booleans, #copy_floats, #copy_ints, #copy_item, #copy_strings, #read, #reset, #set_boolean, #set_float, #set_int, #set_symbol, #to_hash
Constructor Details
#initialize(aDefaultValues, aConfig) ⇒ ConfigXmlClass
Returns a new instance of ConfigXmlClass.
118 119 120 121 122 |
# File 'lib/buzzcore/config.rb', line 118 def initialize(aDefaultValues,aConfig) return super(aDefaultValues,aConfig) unless aConfig.is_a?(REXML::Element) @xmlRoot = aConfig.deep_clone super(aDefaultValues,XmlUtils.read_simple_items(@xmlRoot,'SimpleItems').symbolize_keys) end |
Instance Attribute Details
#xmlRoot ⇒ Object
Returns the value of attribute xmlRoot.
117 118 119 |
# File 'lib/buzzcore/config.rb', line 117 def xmlRoot @xmlRoot end |
Class Method Details
.from_file(aDefaultValues, aFile) ⇒ Object
124 125 126 127 |
# File 'lib/buzzcore/config.rb', line 124 def self.from_file(aDefaultValues,aFile) xml = XmlUtils.get_file_root(aFile) return ConfigXmlClass.new(aDefaultValues,xml) end |