ministryofjustice/Claim-for-Crown-Court-Defence

View on GitHub
app/models/claim/transfer_brain/delegatable.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module Claim
  class TransferBrain
    module Delegatable
      extend ActiveSupport::Concern

      class_methods do
        def transfer_brain_delegate(*method_names)
          method_names.each do |method_name|
            define_method(method_name) do
              Claim::TransferBrain.__send__(method_name.to_sym, self)
            end
          end
        end
      end
    end
  end
end