Module: Aquarium::DSL
Overview
Include this module to add convenience class-level methods to a type, which provide a low-level AOP DSL. For example, instead of writing
Aspect.new :around, :calls_to => ...
You can write the following instead.
include Aspect::DSL
...
around :calls_to => ...
If you don’t want these methods added to a type, then only require aspect.rb and create instances of Aspect, as in the first example.
Class Method Summary collapse
-
.append_features(clazz) ⇒ Object
Add the methods as class, not instance, methods.
Methods included from DSLMethods
Class Method Details
.append_features(clazz) ⇒ Object
Add the methods as class, not instance, methods.
68 69 70 |
# File 'lib/aquarium/dsl/aspect_dsl.rb', line 68 def self.append_features clazz super(class << clazz; self; end) end |