lib/flipper/adapter.rb in flipper-0.11.0.beta3 vs lib/flipper/adapter.rb in flipper-0.11.0.beta4
- old
+ new
@@ -16,9 +16,17 @@
percentage_of_time: nil,
}
end
end
+ # Public: Get all features and gate values in one call. Defaults to one call
+ # to features and another to get_multi. Feel free to override per adapter to
+ # make this more efficient.
+ def get_all
+ instances = features.map { |key| Flipper::Feature.new(key, self) }
+ get_multi(instances)
+ end
+
# Public: Get multiple features in one call. Defaults to one get per
# feature. Feel free to override per adapter to make this more efficient and
# reduce network calls.
def get_multi(features)
result = {}