Class: FactoryGirlStepHelpers::HumanHashToAttributeHash::FindAttributes

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

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

Returns a new instance of FindAttributes.



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

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