Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/cuts/aop.rb,
lib/cuts/cut.rb
Instance Attribute Summary collapse
-
#cross_cut ⇒ Object
readonly
The cut that carries this class's aspects, if any have been applied.
Instance Method Summary collapse
-
#apply(aspect) ⇒ Object
Apply an aspect to this class.
-
#aspects ⇒ Object
The aspects applied to this class, the newest first.
-
#cuts ⇒ Object
The cuts of this class or module, the newest first, which is the order in which they are called.
Instance Attribute Details
#cross_cut ⇒ Object (readonly)
The cut that carries this class's aspects, if any have been applied.
239 240 241 |
# File 'lib/cuts/aop.rb', line 239 def cross_cut @cross_cut end |
Instance Method Details
#apply(aspect) ⇒ Object
Apply an aspect to this class.
242 243 244 245 246 247 |
# File 'lib/cuts/aop.rb', line 242 def apply(aspect) @cross_cut ||= CrossCut.new(self) aspects.unshift(aspect) @cross_cut.reset self end |
#aspects ⇒ Object
The aspects applied to this class, the newest first.
236 |
# File 'lib/cuts/aop.rb', line 236 def aspects; @aspects ||= []; end |
#cuts ⇒ Object
The cuts of this class or module, the newest first, which is the order in which they are called.
107 108 109 |
# File 'lib/cuts/cut.rb', line 107 def cuts @cuts ||= [] end |