Class: Faker::Bot::Reflectors::List Private
- Inherits:
-
Faker::Bot::Reflector
- Object
- Faker::Bot::Reflector
- Faker::Bot::Reflectors::List
- Defined in:
- lib/faker/bot/reflectors/list.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 lists all ‘Faker::Base` subclasses
Instance Attribute Summary collapse
-
#filter ⇒ String?
readonly
private
Output filter.
-
#show_methods ⇒ Boolean?
readonly
private
Boolean flag on whether to list methods or not.
Attributes inherited from Faker::Bot::Reflector
Instance Method Summary collapse
-
#call ⇒ Hash<Class => <Array<Symbol>>] when #show_methods is truthy
private
List ‘Faker::Base` subclasses.
-
#initialize(options = {}) ⇒ List
constructor
Initialize list reflector.
Methods inherited from Faker::Bot::Reflector
Constructor Details
#initialize(options = {}) ⇒ List
Initialize list reflector
36 37 38 39 40 41 |
# File 'lib/faker/bot/reflectors/list.rb', line 36 def initialize( = {}) @filter = [:filter] @show_methods = [:show_methods] super end |
Instance Attribute Details
#filter ⇒ 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.
Output filter
19 20 21 |
# File 'lib/faker/bot/reflectors/list.rb', line 19 def filter @filter end |
#show_methods ⇒ Boolean? (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.
Boolean flag on whether to list methods or not
26 27 28 |
# File 'lib/faker/bot/reflectors/list.rb', line 26 def show_methods @show_methods 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.
List ‘Faker::Base` subclasses
49 50 51 52 53 54 55 |
# File 'lib/faker/bot/reflectors/list.rb', line 49 def call if show_methods list_descendants_with_methods else list_descendants end end |