lib/micro/struct/features.rb in u-struct-0.6.0 vs lib/micro/struct/features.rb in u-struct-0.7.0

- old
+ new

@@ -16,18 +16,18 @@ to_proc: to_proc, readonly: readonly, instance_copy: instance_copy } end - ValidateFeatureNames = ->(values) do - Validate::Names.(values, label: 'feature') + NormalizeFeatureNames = ->(values) do + NormalizeNames::AsSymbols.(values, context: 'feature') end def self.require(names) - features_to_enable = - ValidateFeatureNames[names].each_with_object({}) { |name, memo| memo[name] = true } + to_enable = + NormalizeFeatureNames[names].each_with_object({}) { |name, memo| memo[name] = true } - Check.(**DISABLED.merge(features_to_enable)) + Check.(**DISABLED.merge(to_enable)) end end private_constant :Features end