Sha256: bedd966dcbfdb4ebca8ab54775ffe25e3889b08544d7da210cf14747d2272f46
Contents?: true
Size: 1013 Bytes
Versions: 7
Compression:
Stored size: 1013 Bytes
Contents
module Aspect4r module Model class AdviceMetadata attr_reader :advice_type, :default_options, :mandatory_options def initialize advice_type, default_options = {}, mandatory_options = {} @advice_type = advice_type @default_options = default_options || {} @mandatory_options = mandatory_options || {} end 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 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 end end end
Version data entries
7 entries across 7 versions & 1 rubygems