Class: Sinclair::MethodBuilder::Base Private
- Defined in:
- lib/sinclair/method_builder/base.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.
Base class responsible for building methods
Direct Known Subclasses
Class Method Summary collapse
-
.build(klass, definition, type:) ⇒ Symbol
private
Instantiate the class and build the method.
Instance Method Summary collapse
-
#build ⇒ Symbol
private
Build method (should be implemented in subclass).
-
#initialize(klass, definition, type:) ⇒ Base
constructor
private
A new instance of Base.
Constructor Details
#initialize(klass, definition, type:) ⇒ Base
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 Base.
30 31 32 33 34 |
# File 'lib/sinclair/method_builder/base.rb', line 30 def initialize(klass, definition, type:) @klass = klass @definition = definition @type = type end |
Class Method Details
.build(klass, definition, type:) ⇒ Symbol
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.
Instantiate the class and build the method
21 22 23 |
# File 'lib/sinclair/method_builder/base.rb', line 21 def self.build(klass, definition, type:) new(klass, definition, type: type).build end |
Instance Method Details
#build ⇒ Symbol
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.
Build method (should be implemented in subclass)
41 42 43 |
# File 'lib/sinclair/method_builder/base.rb', line 41 def build raise NotImplementedError, 'Not implemented yet. this should be imlemented in subclasses' end |