Class: OpenSandbox::Pool
- Inherits:
-
Data
- Object
- Data
- OpenSandbox::Pool
- Defined in:
- lib/open_sandbox/models.rb
Overview
Value object for a Pool resource
Instance Attribute Summary collapse
-
#capacity_spec ⇒ Object
readonly
Returns the value of attribute capacity_spec.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Attribute Details
#capacity_spec ⇒ Object (readonly)
Returns the value of attribute capacity_spec
100 101 102 |
# File 'lib/open_sandbox/models.rb', line 100 def capacity_spec @capacity_spec end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at
100 101 102 |
# File 'lib/open_sandbox/models.rb', line 100 def created_at @created_at end |
#name ⇒ Object (readonly)
Returns the value of attribute name
100 101 102 |
# File 'lib/open_sandbox/models.rb', line 100 def name @name end |
#status ⇒ Object (readonly)
Returns the value of attribute status
100 101 102 |
# File 'lib/open_sandbox/models.rb', line 100 def status @status end |
Class Method Details
.from_hash(h) ⇒ Object
101 102 103 104 105 106 107 108 |
# File 'lib/open_sandbox/models.rb', line 101 def self.from_hash(h) new( name: h["name"], capacity_spec: PoolCapacitySpec.from_hash(h["capacitySpec"]), status: h["status"], created_at: h["createdAt"] ? Time.parse(h["createdAt"]) : nil ) end |