Class: Seasar::Container::AspectDef
- Inherits:
-
ArgDef
- Object
- ArgDef
- Seasar::Container::AspectDef
show all
- Defined in:
- lib/seasar/container/aspect-def.rb
Instance Attribute Summary collapse
Attributes inherited from ArgDef
#child_component_def, #container, #expression, #value
Instance Method Summary
collapse
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
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
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
|