Class: Sinclair::MethodBuilder Private
- Defined in:
- lib/sinclair/method_builder.rb,
lib/sinclair/method_builder/base.rb,
lib/sinclair/method_builder/call_method_builder.rb,
lib/sinclair/method_builder/block_method_builder.rb,
lib/sinclair/method_builder/string_method_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.
Class responsible for building methods
Defined Under Namespace
Classes: Base, BlockMethodBuilder, CallMethodBuilder, StringMethodBuilder
Constant Summary collapse
- CLASS_METHOD =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
:class
- INSTANCE_METHOD =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
:instance
Instance Attribute Summary collapse
-
#klass ⇒ Class
readonly
private
class to receive the method.
Instance Method Summary collapse
-
#build_methods(definitions, type) ⇒ MethodDefinitions
private
Builds methods.
-
#initialize(klass) ⇒ MethodBuilder
constructor
private
A new instance of MethodBuilder.
Constructor Details
#initialize(klass) ⇒ MethodBuilder
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 MethodBuilder.
18 19 20 |
# File 'lib/sinclair/method_builder.rb', line 18 def initialize(klass) @klass = klass end |
Instance Attribute Details
#klass ⇒ Class (readonly)
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.
class to receive the method
47 48 49 |
# File 'lib/sinclair/method_builder.rb', line 47 def klass @klass end |
Instance Method Details
#build_methods(definitions, type) ⇒ MethodDefinitions
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.
Builds methods
31 32 33 34 35 |
# File 'lib/sinclair/method_builder.rb', line 31 def build_methods(definitions, type) definitions.each do |definition| definition.build(klass, type) end end |