Class: FactoryBot::DefinitionProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/demo_mode/factory_bot_ext.rb

Instance Method Summary collapse

Instance Method Details

#clever_sequence(name, &block) ⇒ Object Also known as: sequence



5
6
7
8
# File 'lib/demo_mode/factory_bot_ext.rb', line 5

def clever_sequence(name, &block)
  sequence = CleverSequence.new(name, &block)
  add_attribute(name) { sequence.with_class(@instance&.class).next }
end