Class: AfterDo::Loader::AspectApplier
- Inherits:
-
Object
- Object
- AfterDo::Loader::AspectApplier
- Defined in:
- lib/after_do/loader/aspect_applier.rb
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(aspect) ⇒ AspectApplier
constructor
A new instance of AspectApplier.
Constructor Details
#initialize(aspect) ⇒ AspectApplier
Returns a new instance of AspectApplier.
4 5 6 |
# File 'lib/after_do/loader/aspect_applier.rb', line 4 def initialize(aspect) @aspect = aspect end |
Instance Method Details
#apply ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/after_do/loader/aspect_applier.rb', line 8 def apply aspect.advices.each do |advice| advice.targets.each do |target| target.klass.each do |target_klass| extend_and_apply( target_klass, target.target_methods, aspect, advice ) end end end end |