lib/flipper/adapters/operation_logger.rb in flipper-0.8.0 vs lib/flipper/adapters/operation_logger.rb in flipper-0.9.0.beta1

- old
+ new

@@ -1,11 +1,13 @@ +require 'delegate' + module Flipper module Adapters # Public: Adapter that wraps another adapter and stores the operations. # # Useful in tests to verify calls and such. Never use outside of testing. - class OperationLogger + class OperationLogger < SimpleDelegator include ::Flipper::Adapter Operation = Struct.new(:type, :args) OperationTypes = [ @@ -24,9 +26,10 @@ # Internal: The name of the adapter. attr_reader :name # Public def initialize(adapter, operations = nil) + super(adapter) @adapter = adapter @name = :operation_logger @operations = operations || [] end