Class: Aquarium::Finders::PointcutFinder
- Includes:
- Utils::OptionsUtils
- Defined in:
- lib/aquarium/finders/pointcut_finder.rb
Overview
PointcutFinder
Locate named pointcuts in specified types or objects.
Defined Under Namespace
Classes: PoincutFinderResult
Constant Summary collapse
- POINTCUT_FINDER_CANONICAL_OPTIONS =
{}
- CANONICAL_OPTIONS =
Aquarium::Finders::TypeFinder::CANONICAL_OPTIONS.merge(POINTCUT_FINDER_CANONICAL_OPTIONS)
Instance Attribute Summary
Attributes included from Utils::OptionsUtils
Instance Method Summary collapse
-
#find(options = {}) ⇒ Object
Returns a Aquarium::Finders::FinderResult, where the “matched” keys are the input types, type names, and/or regular expressions, and objects for which matches were found and the corresponding values are the class constant or variable pointcuts that were found.
Methods included from Utils::OptionsUtils
append_features, #hashify, #init_specification, universal_options, universal_prepositions, #validate_options
Methods included from Utils::ArrayUtils
#make_array, make_array, #strip_array_nils, strip_array_nils
Methods included from Utils::SetUtils
#make_set, #strip_set_nils, strip_set_nils
Instance Method Details
#find(options = {}) ⇒ Object
Returns a Aquarium::Finders::FinderResult, where the “matched” keys are the input types, type names, and/or regular expressions, and objects for which matches were found and the corresponding values are the class constant or variable pointcuts that were found. The keys in the “not_matched” part of the FinderResult are the specified types and objects for which no matches were found.
The options are as follows:
Types
All the options supported by TypeFinder#find.
Pointcut Names
A name, regular expression or an array of the same. (Mixed allowed.) In the types searched, the names will be matched against class constants and class variable pointcut definitions.
-
:matching => a variable/constant name, regular expression, or array of the same -
:with_names_matching => same -
:named => same
A name, regular expression or an array of the same that will be matched against pointcuts that are class constants only.
-
:constants_matching => a variable/constant name, regular expression, or array of the same -
:constants_with_names_matching => same -
:constants_named => same
A name, regular expression or an array of the same that will be matched against pointcuts that are class variables only.
-
:class_variables_matching => a variable/constant name, regular expression, or array of the same -
:class_variables_with_names_matching => same -
:class_variables_named => same
50 51 52 53 54 55 56 57 |
# File 'lib/aquarium/finders/pointcut_finder.rb', line 50 def find = {} init_specification , CANONICAL_OPTIONS do finish_specification_initialization end result = do_find_pointcuts unless noop unset_specification result end |