Class: Configuration
- Inherits:
-
Object
- Object
- Configuration
- Defined in:
- lib/lab_manager/configuration.rb
Instance Attribute Summary collapse
-
#deployed ⇒ Object
Returns the value of attribute deployed.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Attribute Details
#deployed ⇒ Object
Returns the value of attribute deployed.
26 27 28 |
# File 'lib/lab_manager/configuration.rb', line 26 def deployed @deployed end |
#id ⇒ Object
Returns the value of attribute id.
24 25 26 |
# File 'lib/lab_manager/configuration.rb', line 24 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/lab_manager/configuration.rb', line 25 def name @name end |
Class Method Details
.parse(data) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/lab_manager/configuration.rb', line 3 def self.parse(data) configuration = Configuration.new if !data.__xmlele.empty? if data.__xmlele[0].first.name != "Configuration" data = data.__xmlele[0][1] end data_config = data["Configuration"] if data_config configuration.id = data_config["id"] configuration.name = data_config["name"] configuration.deployed = data_config["isDeployed"] == "true" ? true : false end end configuration end |