Module: WithRandomizations
- Extended by:
- ActiveSupport::Concern
- Included in:
- Exercise
- Defined in:
- app/models/concerns/with_randomizations.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#randomizer ⇒ Object
16 17 18 |
# File 'app/models/concerns/with_randomizations.rb', line 16 def randomizer @randomizer ||= Mumukit::Randomizer.parse(randomizations) end |
#seed ⇒ Object
8 9 10 |
# File 'app/models/concerns/with_randomizations.rb', line 8 def seed @seed || 0 end |
#seed_with!(seed) ⇒ Object
12 13 14 |
# File 'app/models/concerns/with_randomizations.rb', line 12 def seed_with!(seed) @seed = seed end |