Sha256: 9bb0fd0a5454cadc72ceecfa6eee319e96071c5e9597e8b7354c8715ad577a56
Contents?: true
Size: 699 Bytes
Versions: 12
Compression:
Stored size: 699 Bytes
Contents
# frozen_string_literal: true module Mihari module Commands module Initialization include Mixins::Rule def self.included(thor) thor.class_eval do desc "rule", "Create a rule file" method_option :filename, type: :string, default: "rule.yml" def rule filename = options["filename"] warning = "#{filename} exists. Do you want to overwrite it? (y/n)" if File.exist?(filename) && !(yes? warning) return end initialize_rule_yaml filename Mihari.logger.info "The rule file is initialized as #{filename}." end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems