Class: Toy::Core::CLI::List
- Inherits:
-
Object
- Object
- Toy::Core::CLI::List
- Defined in:
- lib/toy/core/cli/list.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ List
constructor
A new instance of List.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ List
Returns a new instance of List.
19 20 21 22 |
# File 'lib/toy/core/cli/list.rb', line 19 def initialize(argv) @argv = argv @json = false end |
Instance Method Details
#run ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/toy/core/cli/list.rb', line 24 def run return EXIT_BAD_INPUT unless parse_args entries = ModelScan.scan if @json emit_json(entries) else emit_human(entries) end EXIT_OK end |