Sha256: ca57617f66bc773f90d58977b3990b888273d30c6f0464718bec31a10e298f77
Contents?: true
Size: 751 Bytes
Versions: 44
Compression:
Stored size: 751 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, network = nil) super(resource, condition) @network = network end def calculate context = Resource::Context.build(@resource, network: @network, redact_confidentials: false) !!context.eval(@expression) end private def initialize_variables(condition) @expression = condition[:ruby] end end end end end
Version data entries
44 entries across 44 versions & 2 rubygems