require 'active_support/concern' module MailEngine module ActsAsMailReceiver extend ActiveSupport::Concern included do cattr_accessor :payload_columns cattr_accessor :groups end module ClassMethods def acts_as_mail_receiver(options) self.payload_columns = options[:payload_columns] self.groups = options[:groups] end end # module InstanceMethods # end end end