Class: AppArchetype::Commands::ListTemplates
- Inherits:
-
Object
- Object
- AppArchetype::Commands::ListTemplates
- Defined in:
- lib/app_archetype/commands/list_templates.rb
Overview
Lists known templates for user
Constant Summary collapse
- RESULT_HEADER =
Output table header
%w[NAME VERSION].freeze
Instance Method Summary collapse
-
#initialize(manager, options = Hashie::Mash.new) ⇒ ListTemplates
constructor
A new instance of ListTemplates.
-
#run ⇒ Object
Lists all known and valid manifests.
Constructor Details
#initialize(manager, options = Hashie::Mash.new) ⇒ ListTemplates
Returns a new instance of ListTemplates.
13 14 15 16 17 |
# File 'lib/app_archetype/commands/list_templates.rb', line 13 def initialize(manager, = Hashie::Mash.new) @manager = manager @options = @prompt = TTY::Prompt.new end |
Instance Method Details
#run ⇒ Object
Lists all known and valid manifests
This renders a manifest list table
Note: any invalid manifests will be excluded from this list.
27 28 29 |
# File 'lib/app_archetype/commands/list_templates.rb', line 27 def run puts(manifest_list_table.render.strip) end |