Class: FactoryGirl::Decorator::InvocationTracker
- Inherits:
-
FactoryGirl::Decorator
- Object
- FactoryGirl::Decorator
- FactoryGirl::Decorator::InvocationTracker
- Defined in:
- lib/factory_girl/decorator/invocation_tracker.rb
Instance Method Summary collapse
- #__invoked_methods__ ⇒ Object
-
#initialize(component) ⇒ InvocationTracker
constructor
A new instance of InvocationTracker.
- #method_missing(name, *args, &block) ⇒ Object
Methods inherited from FactoryGirl::Decorator
Constructor Details
#initialize(component) ⇒ InvocationTracker
Returns a new instance of InvocationTracker.
4 5 6 7 |
# File 'lib/factory_girl/decorator/invocation_tracker.rb', line 4 def initialize(component) super @invoked_methods = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
9 10 11 12 |
# File 'lib/factory_girl/decorator/invocation_tracker.rb', line 9 def method_missing(name, *args, &block) @invoked_methods << name super end |
Instance Method Details
#__invoked_methods__ ⇒ Object
14 15 16 |
# File 'lib/factory_girl/decorator/invocation_tracker.rb', line 14 def __invoked_methods__ @invoked_methods.uniq end |