is_backend.rb 220 B

123456789101112
  1. module Mixin
  2. module IsBackend
  3. extend ActiveSupport::Concern
  4. class_methods do
  5. def is_backend_of(klass) # rubocop:disable Naming/PredicateName
  6. klass.backends.add(self)
  7. end
  8. end
  9. end
  10. end