lib/ldclient-rb/impl/model/feature_flag.rb in launchdarkly-server-sdk-7.3.2 vs lib/ldclient-rb/impl/model/feature_flag.rb in launchdarkly-server-sdk-7.3.3

- old
+ new

@@ -31,11 +31,11 @@ fallthrough = data[:fallthrough] || {} @fallthrough = VariationOrRollout.new(fallthrough[:variation], fallthrough[:rollout], self, errors, "fallthrough") @off_variation = data[:offVariation] check_variation_range(self, errors, @off_variation, "off variation") @prerequisites = (data[:prerequisites] || []).map do |prereq_data| - Prerequisite.new(prereq_data, self, errors) + Prerequisite.new(prereq_data, self) end @targets = (data[:targets] || []).map do |target_data| Target.new(target_data, self, errors) end @context_targets = (data[:contextTargets] || []).map do |target_data| @@ -106,16 +106,15 @@ as_json.to_json(*a) end end class Prerequisite - def initialize(data, flag, errors_out = nil) + def initialize(data, flag) @data = data @key = data[:key] @variation = data[:variation] @failure_result = EvaluatorHelpers.evaluation_detail_for_off_variation(flag, EvaluationReason::prerequisite_failed(@key)) - check_variation_range(flag, errors_out, @variation, "prerequisite") end # @return [Hash] attr_reader :data # @return [String]