Class: Appwrite::Models::Specification
- Inherits:
-
Object
- Object
- Appwrite::Models::Specification
- Defined in:
- lib/appwrite/models/specification.rb
Instance Attribute Summary collapse
-
#cpus ⇒ Object
readonly
Returns the value of attribute cpus.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#memory ⇒ Object
readonly
Returns the value of attribute memory.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(memory:, cpus:, enabled:, slug:) ⇒ Specification
constructor
A new instance of Specification.
- #to_map ⇒ Object
Constructor Details
#initialize(memory:, cpus:, enabled:, slug:) ⇒ Specification
Returns a new instance of Specification.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/appwrite/models/specification.rb', line 11 def initialize( memory:, cpus:, enabled:, slug: ) @memory = memory @cpus = cpus @enabled = enabled @slug = slug end |
Instance Attribute Details
#cpus ⇒ Object (readonly)
Returns the value of attribute cpus.
7 8 9 |
# File 'lib/appwrite/models/specification.rb', line 7 def cpus @cpus end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
8 9 10 |
# File 'lib/appwrite/models/specification.rb', line 8 def enabled @enabled end |
#memory ⇒ Object (readonly)
Returns the value of attribute memory.
6 7 8 |
# File 'lib/appwrite/models/specification.rb', line 6 def memory @memory end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
9 10 11 |
# File 'lib/appwrite/models/specification.rb', line 9 def slug @slug end |
Class Method Details
.from(map:) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/appwrite/models/specification.rb', line 23 def self.from(map:) Specification.new( memory: map["memory"], cpus: map["cpus"], enabled: map["enabled"], slug: map["slug"] ) end |
Instance Method Details
#to_map ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/appwrite/models/specification.rb', line 32 def to_map { "memory": @memory, "cpus": @cpus, "enabled": @enabled, "slug": @slug } end |