Sha256: 96101beffb4984e66f885162cc2fd2da148a43bc4f7fe113a52d8ef9aa6933ef
Contents?: true
Size: 722 Bytes
Versions: 7
Compression:
Stored size: 722 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) !!context.eval(@expression) end private def initialize_variables(condition) @expression = condition[:ruby] end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems