Class: Aspect4r::Model::AdviceMetadata
- Inherits:
-
Object
- Object
- Aspect4r::Model::AdviceMetadata
- Defined in:
- lib/aspect4r/model/advice_metadata.rb
Constant Summary collapse
- BEFORE =
new Aspect4r::Model::Advice::BEFORE, nil, :skip_if_false => false
- BEFORE_FILTER =
new Aspect4r::Model::Advice::BEFORE, nil, :skip_if_false => true
- AFTER =
new Aspect4r::Model::Advice::AFTER, :result_arg => true
- AROUND =
new Aspect4r::Model::Advice::AROUND
Instance Attribute Summary collapse
-
#advice_type ⇒ Object
readonly
Returns the value of attribute advice_type.
-
#default_options ⇒ Object
readonly
Returns the value of attribute default_options.
-
#mandatory_options ⇒ Object
readonly
Returns the value of attribute mandatory_options.
Instance Method Summary collapse
-
#initialize(advice_type, default_options = {}, mandatory_options = {}) ⇒ AdviceMetadata
constructor
A new instance of AdviceMetadata.
- #with_method_prefix ⇒ Object
Constructor Details
#initialize(advice_type, default_options = {}, mandatory_options = {}) ⇒ AdviceMetadata
Returns a new instance of AdviceMetadata.
6 7 8 9 10 |
# File 'lib/aspect4r/model/advice_metadata.rb', line 6 def initialize advice_type, = {}, = {} @advice_type = advice_type @default_options = || {} @mandatory_options = || {} end |
Instance Attribute Details
#advice_type ⇒ Object (readonly)
Returns the value of attribute advice_type.
4 5 6 |
# File 'lib/aspect4r/model/advice_metadata.rb', line 4 def advice_type @advice_type end |
#default_options ⇒ Object (readonly)
Returns the value of attribute default_options.
4 5 6 |
# File 'lib/aspect4r/model/advice_metadata.rb', line 4 def @default_options end |
#mandatory_options ⇒ Object (readonly)
Returns the value of attribute mandatory_options.
4 5 6 |
# File 'lib/aspect4r/model/advice_metadata.rb', line 4 def @mandatory_options end |
Instance Method Details
#with_method_prefix ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/aspect4r/model/advice_metadata.rb', line 12 def with_method_prefix case advice_type when Aspect4r::Model::Advice::BEFORE then "a4r_before_" when Aspect4r::Model::Advice::AFTER then "a4r_after_" when Aspect4r::Model::Advice::AROUND then "a4r_around_" else raise "Aspect4r internal error." end end |