Class: FakerBot::Commands::List

Inherits:
FakerBot::Command show all
Defined in:
lib/fakerbot/commands/list.rb

Instance Attribute Summary

Attributes inherited from FakerBot::Command

#options

Instance Method Summary collapse

Methods inherited from FakerBot::Command

#render

Constructor Details

#initialize(options) ⇒ List

Returns a new instance of List.



8
9
10
# File 'lib/fakerbot/commands/list.rb', line 8

def initialize(options)
  @options = options
end

Instance Method Details

#execute(output: $stdout) ⇒ Object



12
13
14
15
# File 'lib/fakerbot/commands/list.rb', line 12

def execute(output: $stdout)
  result = FakerBot::Reflector.list(show_methods: options[:show_methods])
  render result, output
end