Class: WipeOut::AttributeStrategies::Randomize
- Inherits:
-
Object
- Object
- WipeOut::AttributeStrategies::Randomize
- Defined in:
- lib/wipe_out/attribute_strategies/randomize.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(format: "destroyed_%s") ⇒ Randomize
constructor
A new instance of Randomize.
Constructor Details
#initialize(format: "destroyed_%s") ⇒ Randomize
Returns a new instance of Randomize.
4 5 6 |
# File 'lib/wipe_out/attribute_strategies/randomize.rb', line 4 def initialize(format: "destroyed_%s") @format = format end |
Instance Method Details
#call ⇒ Object
8 9 10 |
# File 'lib/wipe_out/attribute_strategies/randomize.rb', line 8 def call(*) @format % SecureRandom.hex(10) end |