Class: WipeOut::AttributeStrategies::Randomize

Inherits:
Object
  • Object
show all
Defined in:
lib/wipe_out/attribute_strategies/randomize.rb

Instance Method Summary collapse

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

#callObject



8
9
10
# File 'lib/wipe_out/attribute_strategies/randomize.rb', line 8

def call(*)
  @format % SecureRandom.hex(10)
end