Class: Faker::Bot::Reflectors::List Private

Inherits:
Faker::Bot::Reflector show all
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.

List command reflector

Instance Attribute Summary collapse

Attributes inherited from Faker::Bot::Reflector

#descendants_with_methods

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ List

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.

Returns a new instance of List.



18
19
20
21
22
# File 'lib/faker/bot/reflectors/list.rb', line 18

def initialize(options = {})
  @show_methods = options[:show_methods]

  super
end

Instance Attribute Details

#show_methodsObject (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.



12
13
14
# File 'lib/faker/bot/reflectors/list.rb', line 12

def show_methods
  @show_methods
end

Class Method Details

.call(options) ⇒ Object

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.



14
15
16
# File 'lib/faker/bot/reflectors/list.rb', line 14

def self.call(options)
  new(options).call
end

Instance Method Details

#callObject

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.



24
25
26
# File 'lib/faker/bot/reflectors/list.rb', line 24

def call
  show_methods ? all_descendants_with_methods : faker_descendants
end