Class: FactoryGirlStepHelpers::HumanHashToAttributeHash::FindAttributes Private

Inherits:
AttributeStrategy
  • Object
show all
Defined in:
lib/factory_girl/step_definitions.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary

Attributes inherited from AttributeStrategy

#association_manager, #key, #value

Instance Method Summary collapse

Constructor Details

#initialize(human_hash_to_attributes_hash, key, value) ⇒ FindAttributes

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of FindAttributes.



74
75
76
77
78
79
80
81
# File 'lib/factory_girl/step_definitions.rb', line 74

def initialize(human_hash_to_attributes_hash, key, value)
  super

  if association_manager.association
    @key = "#{@key}_id"
    @value = association_manager.association_instance.try(:id)
  end
end