Class: Seasar::Container::AspectDef
- Defined in:
- lib/seasar/container/aspect-def.rb
Instance Attribute Summary collapse
-
#pointcut ⇒ Object
Returns the value of attribute pointcut.
Attributes inherited from ArgDef
#child_component_def, #container, #expression, #value
Instance Method Summary collapse
-
#aspect ⇒ Object
-
args - none - return - Seasar::Aop::Aspect.
-
-
#initialize(pointcut, interceptor = nil, &procedure) ⇒ AspectDef
constructor
-
args 1.
-
-
#value=(interceptor) ⇒ Object
-
args 1.
-
Constructor Details
#initialize(pointcut, interceptor = nil, &procedure) ⇒ AspectDef
-
args
-
Regexp pointcut
-
Object interceptor
-
Proc procedure
-
29 30 31 32 33 34 35 |
# File 'lib/seasar/container/aspect-def.rb', line 29 def initialize(pointcut, interceptor = nil, &procedure) if interceptor.nil? and procedure interceptor = procedure end super(interceptor) @pointcut = Seasar::Aop::Pointcut.new(pointcut) end |
Instance Attribute Details
#pointcut ⇒ Object
Returns the value of attribute pointcut.
36 37 38 |
# File 'lib/seasar/container/aspect-def.rb', line 36 def pointcut @pointcut end |
Instance Method Details
#aspect ⇒ Object
-
args
-
none
-
-
return
-
Seasar::Aop::Aspect
-
44 45 46 |
# File 'lib/seasar/container/aspect-def.rb', line 44 def aspect return Seasar::Aop::Aspect.new(self.value, self.pointcut) end |
#value=(interceptor) ⇒ Object
-
args
-
Object interceptor
-
-
return
-
none
-
54 55 56 57 |
# File 'lib/seasar/container/aspect-def.rb', line 54 def value=(interceptor) raise ArgumentError.new("call method not defined on [#{interceptor} (#{interceptor.class})].") if not interceptor.class.method_defined?(:call) super end |