Class: Fabricators::Fetcher
- Inherits:
-
Object
- Object
- Fabricators::Fetcher
- Defined in:
- lib/fabricators/fetcher.rb
Instance Method Summary collapse
- #fabricator(name, options = {}, &block) ⇒ Object
-
#initialize(name, options, &block) ⇒ Fetcher
constructor
A new instance of Fetcher.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(name, options, &block) ⇒ Fetcher
Returns a new instance of Fetcher.
4 5 6 7 8 |
# File 'lib/fabricators/fetcher.rb', line 4 def initialize(name, , &block) @name = name @options = instance_eval &block end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
14 15 |
# File 'lib/fabricators/fetcher.rb', line 14 def method_missing(name, *args, &block) end |
Instance Method Details
#fabricator(name, options = {}, &block) ⇒ Object
10 11 12 |
# File 'lib/fabricators/fetcher.rb', line 10 def fabricator(name, ={}, &block) Fabricators.definitions.fabricator name, @options.merge(.merge(parent: @name)), &block end |