Class: ThreeScaleToolbox::Commands::PlansCommand::Import::ImportMetricsStep

Inherits:
Object
  • Object
show all
Includes:
Step
Defined in:
lib/3scale_toolbox/commands/plans_command/import/import_plan_metrics_step.rb

Instance Attribute Summary

Attributes included from Step

#context

Instance Method Summary collapse

Methods included from Step

#artifacts_resource, #file, #find_feature_by_system_name, #find_metric_by_system_name, #initialize, #invalidate_service_methods, #invalidate_service_metrics, #plan, #plan_system_name, #resource_features, #resource_limits, #resource_methods, #resource_metrics, #resource_plan, #resource_pricing_rules, #result, #service, #service_features, #service_hits, #service_methods, #service_metrics, #service_metrics_and_methods, #service_system_name, #threescale_client

Instance Method Details

#callObject

Writes Plan metrics and methods



9
10
11
12
13
14
15
16
# File 'lib/3scale_toolbox/commands/plans_command/import/import_plan_metrics_step.rb', line 9

def call
  missing_metrics.each(&method(:create_metric))
  missing_methods.each(&method(:create_method))

  # invalidate memoized methods and metrics
  invalidate_service_methods
  invalidate_service_metrics
end