class Cucumber::Core::Test::Result::StrictConfiguration
affected by the strict options (that is the STRICT_AFFECTED_TYPES).
Handles the strict settings for the result types that are
def initialize(strict_types = [])
def initialize(strict_types = []) @settings = STRICT_AFFECTED_TYPES.to_h { |t| [t, :default] } strict_types.each do |type| set_strict(true, type) end end
def merge!(other)
def merge!(other) settings.each_key do |type| set_strict(other.strict?(type), type) if other.set?(type) end self end
def set?(type)
def set?(type) settings[type] != :default end
def set_strict(setting, type = nil)
def set_strict(setting, type = nil) if type.nil? STRICT_AFFECTED_TYPES.each { |type| set_strict(setting, type) } else settings[type] = setting end end
def strict?(type = nil)
def strict?(type = nil) if type.nil? settings.each_value do |value| return true if value == true end false else return false unless settings.key?(type) return false unless set?(type) settings[type] end end