Module | Aspects
In: | lib/facets/more/aspects.rb

Add support for Aspect Oriented Programming (AOP).

### Examples

class Controller

      pre :force_login, :where => :prepend
      wrap Benchmark, :on => :index
      post :taraa, :on => login

end

module Timestamped

      pre :on => :og_insert { |this| this.create_time = Time.now }
      pre :on => :og_update { |this| this.update_time = Time.now }
      pre :on => [:og_insert, :og_update] { |this| this.create_time = Time.now }

end

### Methods

append_features include_advice_modules wrap

### Constants

Advice | = | Struct.new(:code, :options) |  | Store the code and the metadata (options) for an Advice.

### External Aliases

wrap | -> | apply_advices

### Public Class methods

append_features(base)
include_advice_modules(target)

Include Modules that define advices.

wrap(target, methods = target.instance_methods)

Apply the advices to the target class.

[Validate]