Class: Fabricators::Reader
- Inherits:
-
Object
- Object
- Fabricators::Reader
- Defined in:
- lib/fabricators/reader.rb
Instance Method Summary collapse
- #fabricator(name, options = {}, &block) ⇒ Object
-
#initialize(name, options, &block) ⇒ Reader
constructor
A new instance of Reader.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(name, options, &block) ⇒ Reader
Returns a new instance of Reader.
4 5 6 7 8 |
# File 'lib/fabricators/reader.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/reader.rb', line 14 def method_missing(name, *args, &block) end |
Instance Method Details
#fabricator(name, options = {}, &block) ⇒ Object
10 11 12 |
# File 'lib/fabricators/reader.rb', line 10 def fabricator(name, ={}, &block) Fabricators.definitions.fabricator name, @options.merge(.merge(parent: @name)), &block end |