Sha256: e41dabaf1f892492ee07f00fb4f9743df2d44aa0c3a71512327fce4a3ffcbe27

Contents?: true

Size: 665 Bytes

Versions: 10

Compression:

Stored size: 665 Bytes

Contents

require_relative 'base_conditions_filter'
require_relative '../resource/context'
require 'date'

module Gitlab
  module Triage
    module Filters
      class RubyConditionsFilter < BaseConditionsFilter
        def self.limiter_parameters
          [{ name: :ruby, type: String }]
        end

        def initialize(resource, condition, net = {})
          super(resource, condition)

          @net = net
        end

        def calculate
          !!Resource::Context.new(@resource, @net).eval(@expression)
        end

        private

        def initialize_variables(condition)
          @expression = condition[:ruby]
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gitlab-triage-0.14.1 lib/gitlab/triage/filters/ruby_conditions_filter.rb
gitlab-triage-0.14.0 lib/gitlab/triage/filters/ruby_conditions_filter.rb
gitlab-triage-0.13.0 lib/gitlab/triage/filters/ruby_conditions_filter.rb
gitlab-triage-0.12.0 lib/gitlab/triage/filters/ruby_conditions_filter.rb
gitlab-triage-0.11.0 lib/gitlab/triage/filters/ruby_conditions_filter.rb
gitlab-triage-0.10.0 lib/gitlab/triage/filters/ruby_conditions_filter.rb
gitlab-triage-0.9.0 lib/gitlab/triage/filters/ruby_conditions_filter.rb
gitlab-triage-0.8.1 lib/gitlab/triage/filters/ruby_conditions_filter.rb
gitlab-triage-0.8.0 lib/gitlab/triage/filters/ruby_conditions_filter.rb
gitlab-triage-0.7.0 lib/gitlab/triage/filters/ruby_conditions_filter.rb