Class: Kubes::CLI::New::Hook

Inherits:
Sequence
  • Object
show all
Defined in:
lib/kubes/cli/new/hook.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Logging

#logger

Class Method Details

.optionsObject



5
6
7
8
9
# File 'lib/kubes/cli/new/hook.rb', line 5

def self.options
  [
    [:force, aliases: ["y"], type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files"],
  ]
end

Instance Method Details

#create_hookObject



13
14
15
16
# File 'lib/kubes/cli/new/hook.rb', line 13

def create_hook
  set_source("new/hooks")
  template "#{type}.rb", ".kubes/config/hooks/#{type}.rb"
end