Class: FactoryHelper::Config
- Inherits:
-
Object
- Object
- FactoryHelper::Config
- Defined in:
- lib/factory-helper.rb
Class Attribute Summary collapse
- .locale ⇒ Object
-
.random ⇒ Object
readonly
Returns the value of attribute random.
Class Method Summary collapse
Class Attribute Details
.locale ⇒ Object
25 26 27 |
# File 'lib/factory-helper.rb', line 25 def locale @locale || I18n.locale end |
.random ⇒ Object (readonly)
Returns the value of attribute random.
23 24 25 |
# File 'lib/factory-helper.rb', line 23 def random @random end |
Class Method Details
.seed ⇒ Object
29 30 31 |
# File 'lib/factory-helper.rb', line 29 def seed @random.seed end |
.seed=(new_seed) ⇒ Object
33 34 35 36 |
# File 'lib/factory-helper.rb', line 33 def seed= new_seed new_seed||= Random.new_seed.to_i* Kernel.rand(18446744073709551615).to_i @random= Random.new(new_seed) end |