Class: Sinclair::Options::Builder Private
- Defined in:
- lib/sinclair/options/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.
Option Class Builder
This class builds methods for options objects
Constant Summary
Constants inherited from Sinclair
Instance Attribute Summary
Attributes inherited from Sinclair
Attributes included from Sinclair::OptionsParser
Instance Method Summary collapse
-
#build ⇒ Array<MethodDefinition>
private
Finish building options.
-
#initialize(klass, *options) ⇒ Builder
constructor
private
A new instance of Builder.
Methods inherited from Sinclair
#add_class_method, #add_method, build, #eval_and_add_method
Methods included from Sinclair::OptionsParser
Constructor Details
#initialize(klass, *options) ⇒ Builder #initialize(klass, *options, **defaults) ⇒ 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.
24 25 26 27 28 |
# File 'lib/sinclair/options/builder.rb', line 24 def initialize(klass, *) super(klass) @attributes = Sinclair::InputHash.input_hash(*) end |
Instance Method Details
#build ⇒ Array<MethodDefinition>
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.
Finish building options
Add options to allowed options and adds all methods
37 38 39 40 41 42 |
# File 'lib/sinclair/options/builder.rb', line 37 def build add_all_methods add_filds_to_equals super end |