Class: Aspect4r::Model::AspectData
- Inherits:
-
Array
- Object
- Array
- Aspect4r::Model::AspectData
- Defined in:
- lib/aspect4r/model/aspect_data.rb
Instance Method Summary collapse
- #advices_for_method(method) ⇒ Object
- #change_group ⇒ Object
- #group ⇒ Object
- #group_index ⇒ Object
-
#initialize(klass_or_module) ⇒ AspectData
constructor
A new instance of AspectData.
- #wrapped_methods ⇒ Object
Constructor Details
#initialize(klass_or_module) ⇒ AspectData
Returns a new instance of AspectData.
6 7 8 |
# File 'lib/aspect4r/model/aspect_data.rb', line 6 def initialize klass_or_module @group = klass_or_module.hash end |
Instance Method Details
#advices_for_method(method) ⇒ Object
26 27 28 29 |
# File 'lib/aspect4r/model/aspect_data.rb', line 26 def advices_for_method method method = method.to_s select {|advice| advice.method_matcher.match?(method) } end |
#change_group ⇒ Object
22 23 24 |
# File 'lib/aspect4r/model/aspect_data.rb', line 22 def change_group @group_index = group_index + 1 end |
#group ⇒ Object
18 19 20 |
# File 'lib/aspect4r/model/aspect_data.rb', line 18 def group "#{@group}:#{group_index}" end |
#group_index ⇒ Object
14 15 16 |
# File 'lib/aspect4r/model/aspect_data.rb', line 14 def group_index @group_index ||= 0 end |
#wrapped_methods ⇒ Object
10 11 12 |
# File 'lib/aspect4r/model/aspect_data.rb', line 10 def wrapped_methods @wrapped_methods ||= {} end |