Sha256: ee206b5f863041031299d6743764a35fe099280c6ed4680bb315a989af6bdd55

Contents?: true

Size: 430 Bytes

Versions: 12

Compression:

Stored size: 430 Bytes

Contents

module ThreeScaleToolbox
  module Tasks
    class DestroyMappingRulesTask
      attr_reader :context

      def initialize(context)
        @context = context
      end

      def call
        puts 'destroying all mapping rules'
        target.mapping_rules.each do |mapping_rule|
          target.delete_mapping_rule mapping_rule['id']
        end
      end

      def target
        context[:target]
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
3scale_toolbox-0.15.0 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.14.0 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.13.0 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.12.4 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.12.3 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.12.2 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.11.0 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.10.0 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.9.0 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.8.0 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.7.0 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb
3scale_toolbox-0.6.0 lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb