Sha256: 4ef6d5214fb1cae37ef32a21c1be07652c9a0957ce58cca2756173da1dcb6958

Contents?: true

Size: 481 Bytes

Versions: 11

Compression:

Stored size: 481 Bytes

Contents

module Martyr
  module Runtime
    class WhereOperatorForMetric < BaseOperator

      attr_reader :metric_name
      alias_method :add_where, :operate

      def initialize(metric_name, &block)
        super(&block)
        @metric_name = metric_name
      end

      private

      def handle_outer(wrapper)
        wrapper.add_to_where(*operation_args)
      end

      def supported_for?(fact_scope)
        fact_scope.supports_metric?(metric_name)
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
martyr-0.1.85.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb
martyr-0.1.84.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb
martyr-0.1.82.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb
martyr-0.1.81.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb
martyr-0.1.80.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb
martyr-0.1.79.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb
martyr-0.1.78.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb
martyr-0.1.77.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb
martyr-0.1.76.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb
martyr-0.1.75.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb
martyr-0.1.74.pre lib/martyr/runtime/scope_operators/where_operator_for_metric.rb