Class: Sinclair::Model::Builder Private
- Defined in:
- lib/sinclair/model/builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Builder responsible for building methods to a new Sinclair::Model class
The building adds readers/setters and an initializer with named parameters
Constant Summary
Constants inherited from Sinclair
Instance Attribute Summary
Attributes inherited from Sinclair
Instance Method Summary collapse
-
#initialize(klass, *attributes, **options) ⇒ Builder
constructor
private
A new instance of Builder.
Methods inherited from Sinclair
#add_class_method, #add_method, #build, build, #eval_and_add_method
Methods included from ClassMethods
Methods included from OptionsParser
Constructor Details
#initialize(klass, *attributes, writter: true, comparable: true) ⇒ Builder #initialize(klass, *attributes, defaults, writter: true, comparable: true) ⇒ Builder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Builder.
29 30 31 32 33 34 35 36 37 |
# File 'lib/sinclair/model/builder.rb', line 29 def initialize(klass, *attributes, **) super(klass) @attributes = attributes.flatten @options = BuilderOptions.new(**) add_methods change_equals change_initializer end |