Class: Faker::Bot::Reflectors::Search Private
- Inherits:
-
Faker::Bot::Reflector
- Object
- Faker::Bot::Reflector
- Faker::Bot::Reflectors::Search
- Defined in:
- lib/faker/bot/reflectors/search.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Reflection object that searches all ‘Faker::Base` subclass methods
* Currently operates at O(n); improvements welcome. :)
Instance Attribute Summary collapse
-
#query ⇒ String?
readonly
private
Reflector query.
Attributes inherited from Faker::Bot::Reflector
Instance Method Summary collapse
-
#call ⇒ Hash<Class => <Array<Symbol>>] when #show_methods is truthy
private
Search through ‘Faker::Base` subclasses and return matching results.
-
#initialize(query) ⇒ Search
constructor
Initialize search reflector.
Methods inherited from Faker::Bot::Reflector
Constructor Details
#initialize(query) ⇒ Search
Initialize search reflector
28 29 30 31 32 |
# File 'lib/faker/bot/reflectors/search.rb', line 28 def initialize(query) @query = query.downcase super end |
Instance Attribute Details
#query ⇒ String? (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Reflector query
20 21 22 |
# File 'lib/faker/bot/reflectors/search.rb', line 20 def query @query end |
Instance Method Details
#call ⇒ Hash<Class => <Array<Symbol>>] when #show_methods is truthy
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Search through ‘Faker::Base` subclasses and return matching results
40 41 42 43 |
# File 'lib/faker/bot/reflectors/search.rb', line 40 def call search_descendants_matching_query descendants_with_methods end |