Sha256: 2723fdc9eb6c8e31a1da537ff0b76383bd01abe358ea33d478f1b8d0fce13d28

Contents?: true

Size: 847 Bytes

Versions: 6

Compression:

Stored size: 847 Bytes

Contents

# frozen_string_literal: true

module NgrokAPI
  module Models
    class EndpointCircuitBreaker
      attr_reader :client,
        :result,
        :enabled,
        :tripped_duration,
        :rolling_window,
        :num_buckets,
        :volume_threshold,
        :error_threshold_percentage

      def initialize(client:, result:)
        @client = client
        @result = result
        @enabled = @result['enabled']
        @tripped_duration = @result['tripped_duration']
        @rolling_window = @result['rolling_window']
        @num_buckets = @result['num_buckets']
        @volume_threshold = @result['volume_threshold']
        @error_threshold_percentage = @result['error_threshold_percentage']
      end

      def ==(other)
        @result == other.result
      end

      def to_s
        @result.to_s
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ngrok-api-0.18.0 lib/ngrokapi/models/endpoint_circuit_breaker.rb
ngrok-api-0.17.0 lib/ngrokapi/models/endpoint_circuit_breaker.rb
ngrok-api-0.16.0 lib/ngrokapi/models/endpoint_circuit_breaker.rb
ngrok-api-0.15.0 lib/ngrokapi/models/endpoint_circuit_breaker.rb
ngrok-api-0.14.0 lib/ngrokapi/models/endpoint_circuit_breaker.rb
ngrok-api-0.12.0 lib/ngrokapi/models/endpoint_circuit_breaker.rb