Class: FactoryGirl::StrategyCalculator Private
- Inherits:
-
Object
- Object
- FactoryGirl::StrategyCalculator
- Defined in:
- lib/factory_girl/strategy_calculator.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 Method Summary collapse
-
#initialize(name_or_object) ⇒ StrategyCalculator
constructor
private
A new instance of StrategyCalculator.
- #strategy ⇒ Object private
Constructor Details
#initialize(name_or_object) ⇒ StrategyCalculator
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 StrategyCalculator.
4 5 6 |
# File 'lib/factory_girl/strategy_calculator.rb', line 4 def initialize(name_or_object) @name_or_object = name_or_object end |
Instance Method Details
#strategy ⇒ Object
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.
8 9 10 11 12 13 14 |
# File 'lib/factory_girl/strategy_calculator.rb', line 8 def strategy if strategy_is_object? @name_or_object else strategy_name_to_object end end |