Class: Sorare::Rewards::Random

Inherits:
Random
  • Object
show all
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

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