Sha256: f83c82aa3d119b5f7073f8b09d438619bdaaedbf0b5bb69c84c7160ac77db0fe

Contents?: true

Size: 506 Bytes

Versions: 12

Compression:

Stored size: 506 Bytes

Contents

class Ufo::CLI::New
  class Hook < Sequence
    argument :type, default: "ufo", description: "IE: docker, ufo" # description doesnt really show up

    def self.cli_options
      [
        [:force, aliases: ["y"], type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files"],
      ]
    end
    cli_options.each { |args| class_option(*args) }

  public
    def create_hook
      set_template_source("hook")
      template "#{type}.rb", ".ufo/config/hooks/#{type}.rb"
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ufo-6.3.13 lib/ufo/cli/new/hook.rb
ufo-6.3.12 lib/ufo/cli/new/hook.rb
ufo-6.3.11 lib/ufo/cli/new/hook.rb
ufo-6.3.10 lib/ufo/cli/new/hook.rb
ufo-6.3.9 lib/ufo/cli/new/hook.rb
ufo-6.3.8 lib/ufo/cli/new/hook.rb
ufo-6.3.7 lib/ufo/cli/new/hook.rb
ufo-6.3.6 lib/ufo/cli/new/hook.rb
ufo-6.3.5 lib/ufo/cli/new/hook.rb
ufo-6.3.4 lib/ufo/cli/new/hook.rb
ufo-6.3.3 lib/ufo/cli/new/hook.rb
ufo-6.3.2 lib/ufo/cli/new/hook.rb