Sha256: 392cdfc3c92fec5440cbffa8278af771a6593c282cde566eb442a804c02c748c
Contents?: true
Size: 714 Bytes
Versions: 5
Compression:
Stored size: 714 Bytes
Contents
# frozen_string_literal: true require "colorize" module Mihari module Commands module Config def self.included(thor) thor.class_eval do desc "init_config", "Create a config file" method_option :filename, type: :string, default: "mihari.yml" def init_config filename = options["filename"] warning = "#{filename} exists. Do you want to overwrite it? (y/n)" if File.exist?(filename) && !(yes? warning) return end Mihari::Config.initialize_yaml filename puts "The config file is initialized as #{filename}.".colorize(:blue) end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems