Class: Inventarium::CLI::Init

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/inventarium/cli/init.rb

Constant Summary collapse

CLASSIFICATION_VALUES =
%w[critical normal internal experiment]
STATUS_VALUES =
%w[adopt hold trial in_development]

Instance Method Summary collapse

Instance Method Details

#call(args: []) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/inventarium/cli/init.rb', line 17

def call(args: [], **)
  dir = args.first || './service.yaml'
  result = base_service_information

  pastel = Pastel.new
  printf "Generating a new service.yaml\t\t"

  TemplateGenerator.new.call(dir: dir, payload: result)

  puts "[#{pastel.green('DONE')}]"
end