From 01a33a23016ae931a5cb474ebdd54f2e2a365cc7 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Fri, 12 Jan 2024 17:23:59 +0100 Subject: [PATCH] Add #each_key method --- lib/active_settings/config.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/active_settings/config.rb b/lib/active_settings/config.rb index 6b0364e..4bf0c66 100644 --- a/lib/active_settings/config.rb +++ b/lib/active_settings/config.rb @@ -4,6 +4,7 @@ # See: https://github.com/rubyconfig/config/blob/master/lib/config/options.rb module ActiveSettings + # rubocop:disable Metrics/ClassLength class Config < OpenStruct def each(*args, &block) @@ -11,6 +12,11 @@ def each(*args, &block) end + def each_key(*args, &block) + marshal_dump.each_key(*args, &block) + end + + def collect(*args, &block) marshal_dump.collect(*args, &block) end @@ -157,4 +163,5 @@ def auto_type(val) # rubocop:enable Style/RescueModifier end + # rubocop:enable Metrics/ClassLength end