| Module | Aquarium::Aspects::AdviceChainNodeFactory |
| In: |
lib/aquarium/aspects/advice.rb
|
The advice_kind argument must be one of the values returned by Advice.kinds or one of the special values ":no" or ":none", signfying a node for which there is no advice, where the actual method being advised is called directly instead. This kind of node is normally used as the terminal leaf in the chain.
# File lib/aquarium/aspects/advice.rb, line 262
262: def self.make_node options = {}
263: advice_kind = options[:advice_kind]
264: raise Aquarium::Utils::InvalidOptions.new("Unknown advice kind specified: #{advice_kind}") unless valid(advice_kind)
265: advice_kind = :no if advice_kind == :none
266: advice_chain_node_name = advice_kind.to_s.to_camel_case + "AdviceChainNode"
267: clazz = Aquarium::Aspects.const_get advice_chain_node_name
268: clazz.new options
269: end