Class: Alchemrest::FactoryBot::HashStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/alchemrest/factory_bot.rb

Instance Method Summary collapse

Instance Method Details

#association(runner) ⇒ Object



51
52
53
# File 'lib/alchemrest/factory_bot.rb', line 51

def association(runner)
  runner.run(:alchemrest_hash_for)
end

#result(evaluation) ⇒ Object



55
56
57
# File 'lib/alchemrest/factory_bot.rb', line 55

def result(evaluation)
  evaluation.hash.reject { |_, v| v.is_a?(Alchemrest::FactoryBot::OmitKey) }
end

#to_symObject



59
60
61
# File 'lib/alchemrest/factory_bot.rb', line 59

def to_sym
  :alchemrest_hash_for
end