Sha256: b1a56b7db5e91f8e1f71f199a3c1e03ce9250e3bc0428675d2daf76639a1d2f7
Contents?: true
Size: 874 Bytes
Versions: 10
Compression:
Stored size: 874 Bytes
Contents
module ThreeScaleToolbox module Commands module ServiceCommand module CopyCommand class DestroyMappingRulesTask attr_reader :context def initialize(context) @context = context end def call return unless delete_mapping_rules logger.info 'destroying all mapping rules' target.mapping_rules.each(&:delete) end private def delete_mapping_rules context.fetch(:delete_mapping_rules, false) end def target context.fetch(:target) end def logger context[:logger] ||= Logger.new($stdout).tap do |logger| logger.formatter = proc { |severity, datetime, progname, msg| "#{msg}\n" } end end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems