Class: Azeroth::Decorator::MethodBuilder Private
- Inherits:
-
Sinclair
- Object
- Sinclair
- Azeroth::Decorator::MethodBuilder
- Defined in:
- lib/azeroth/decorator/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.
Responsible for building readers for attributes
Class Method Summary collapse
-
.build_reader(klass, attribute) ⇒ Array<Sinclair::MethodDefinition>
private
Builds reader.
Instance Method Summary collapse
-
#build_reader(attribute) ⇒ Array<Sinclair::MethodDefinition>
private
Builds reader.
Class Method Details
.build_reader(klass, attribute) ⇒ Array<Sinclair::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.
Builds reader
reaader delegate method calls to @object
15 16 17 |
# File 'lib/azeroth/decorator/method_builder.rb', line 15 def self.build_reader(klass, attribute) new(klass).build_reader(attribute) end |
Instance Method Details
#build_reader(attribute) ⇒ Array<Sinclair::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.
Builds reader
reaader delegate method calls to @object
20 21 22 23 |
# File 'lib/azeroth/decorator/method_builder.rb', line 20 def build_reader(attribute) add_method(attribute, "@object.#{attribute}") build end |