Module: Sinclair::ClassMethods
- Included in:
- Sinclair
- Defined in:
- lib/sinclair/class_methods.rb
Overview
Class methods for Sinclair
Instance Method Summary collapse
-
#build(*args, **options, &block) ⇒ Array<MethodDefinition>
Runs build using a block for adding the methods.
Instance Method Details
#build(*args, **options, &block) ⇒ Array<MethodDefinition>
Runs build using a block for adding the methods
The block is executed adding the methods and after the builder runs build building all the methods
36 37 38 39 40 |
# File 'lib/sinclair/class_methods.rb', line 36 def build(*, **, &) new(*, **).tap do |builder| builder.instance_eval(&) if block_given? end.build end |