Class: AutoCode::Creator
- Inherits:
-
Object
- Object
- AutoCode::Creator
- Defined in:
- lib/autocode.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options, &block) ⇒ Creator
constructor
A new instance of Creator.
Constructor Details
#initialize(options, &block) ⇒ Creator
Returns a new instance of Creator.
26 27 28 |
# File 'lib/autocode.rb', line 26 def initialize( , &block ) @exemplar = ([:exemplar]||Module.new).clone; @block = block end |
Instance Method Details
#call ⇒ Object
29 |
# File 'lib/autocode.rb', line 29 def call ; @exemplar.module_eval( &@block ) if @block ; @exemplar ; end |