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