Class: Anima::Builder
- Inherits:
-
Object
- Object
- Anima::Builder
- Includes:
- Adamantium::Flat
- Defined in:
- lib/anima/builder.rb
Overview
Builds an anima infected class
Defined Under Namespace
Modules: Methods
Class Method Summary collapse
-
.call(anima, descendant) ⇒ undefined
private
Infect
descendant
with anima.
Instance Method Summary collapse
-
#call ⇒ undefined
private
Infect the instance with anima.
-
#initialize(anima, descendant) ⇒ undefined
constructor
private
Initialize a new instance.
Constructor Details
#initialize(anima, descendant) ⇒ undefined
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.
Initialize a new instance
60 61 62 63 64 |
# File 'lib/anima/builder.rb', line 60 def initialize(anima, descendant) @anima = anima @names = anima.attribute_names @descendant = descendant end |
Class Method Details
.call(anima, descendant) ⇒ undefined
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.
Infect descendant
with anima
45 46 47 |
# File 'lib/anima/builder.rb', line 45 def self.call(anima, descendant) new(anima, descendant).call end |
Instance Method Details
#call ⇒ undefined
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.
Infect the instance with anima
71 72 73 74 75 76 77 78 |
# File 'lib/anima/builder.rb', line 71 def call define_equalizer define_anima_method define_attribute_readers descendant_exec do include Methods end end |