Class: Sorare::Rewards::Random
- Inherits:
-
Random
- Object
- Random
- Sorare::Rewards::Random
- Defined in:
- lib/sorare/rewards/random.rb
Overview
Random serves as an extension of the default Random class to work with the salt and seed
Instance Method Summary collapse
-
#initialize(seed, salt) ⇒ Random
constructor
A new instance of Random.
Constructor Details
#initialize(seed, salt) ⇒ Random
Returns a new instance of Random.
9 10 11 |
# File 'lib/sorare/rewards/random.rb', line 9 def initialize(seed, salt) super Digest::SHA256.hexdigest("#{seed}#{salt}").to_i(16) end |