lib/micro/struct/features.rb in u-struct-0.10.0 vs lib/micro/struct/features.rb in u-struct-0.11.0
- old
+ new
@@ -15,16 +15,15 @@
to_proc: to_proc,
readonly: readonly,
instance_copy: instance_copy }
end
- NormalizeFeatureNames = ->(values) do
+ Names = ->(values) do
NormalizeNames::AsSymbols.(values, context: 'feature')
end
- def self.require(names)
- to_enable =
- NormalizeFeatureNames[names].each_with_object({}) { |name, memo| memo[name] = true }
+ def self.require(values)
+ to_enable = Names[values].each_with_object({}) { |name, memo| memo[name] = true }
Check.(**DISABLED.merge(to_enable))
end
end