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.
22 23 24 |
# File 'lib/lab_manager/configuration.rb', line 22 def deployed @deployed end |
#id ⇒ Object
Returns the value of attribute id.
20 21 22 |
# File 'lib/lab_manager/configuration.rb', line 20 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/lab_manager/configuration.rb', line 21 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 |
# File 'lib/lab_manager/configuration.rb', line 3 def self.parse(data) if !data.keys.empty? && data.keys.first != "Configuration" data = data.values[0] end configuration = Configuration.new 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 configuration end |