Class: Appwrite::Models::AlgoArgon2
- Inherits:
-
Object
- Object
- Appwrite::Models::AlgoArgon2
- Defined in:
- lib/appwrite/models/algo_argon2.rb
Instance Attribute Summary collapse
-
#memory_cost ⇒ Object
readonly
Returns the value of attribute memory_cost.
-
#threads ⇒ Object
readonly
Returns the value of attribute threads.
-
#time_cost ⇒ Object
readonly
Returns the value of attribute time_cost.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(memory_cost:, time_cost:, threads:) ⇒ AlgoArgon2
constructor
A new instance of AlgoArgon2.
- #to_map ⇒ Object
Constructor Details
#initialize(memory_cost:, time_cost:, threads:) ⇒ AlgoArgon2
Returns a new instance of AlgoArgon2.
10 11 12 13 14 15 16 17 18 |
# File 'lib/appwrite/models/algo_argon2.rb', line 10 def initialize( memory_cost:, time_cost:, threads: ) @memory_cost = memory_cost @time_cost = time_cost @threads = threads end |
Instance Attribute Details
#memory_cost ⇒ Object (readonly)
Returns the value of attribute memory_cost.
6 7 8 |
# File 'lib/appwrite/models/algo_argon2.rb', line 6 def memory_cost @memory_cost end |
#threads ⇒ Object (readonly)
Returns the value of attribute threads.
8 9 10 |
# File 'lib/appwrite/models/algo_argon2.rb', line 8 def threads @threads end |
#time_cost ⇒ Object (readonly)
Returns the value of attribute time_cost.
7 8 9 |
# File 'lib/appwrite/models/algo_argon2.rb', line 7 def time_cost @time_cost end |
Class Method Details
.from(map:) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/appwrite/models/algo_argon2.rb', line 20 def self.from(map:) AlgoArgon2.new( memory_cost: map["memoryCost"], time_cost: map["timeCost"], threads: map["threads"] ) end |
Instance Method Details
#to_map ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/appwrite/models/algo_argon2.rb', line 28 def to_map { "memoryCost": @memory_cost, "timeCost": @time_cost, "threads": @threads } end |