Module: JumpIn::Authentication::ClassMethods

Defined in:
lib/jump_in/authentication.rb

Overview

CLASS METHODS

Instance Method Summary collapse

Instance Method Details

#jumpin_callback(callback, jumpin_method) ⇒ Object



60
61
62
63
64
65
66
# File 'lib/jump_in/authentication.rb', line 60

def jumpin_callback(callback, jumpin_method)
  jumpin_constant = callback.upcase
  unless self.constants.include?(jumpin_constant)
    const_set(jumpin_constant, [])
  end
  const_get(jumpin_constant) << jumpin_method
end

#jumpin_use(persistence:) ⇒ Object



68
69
70
71
72
73
# File 'lib/jump_in/authentication.rb', line 68

def jumpin_use(persistence:)
  persistence.each do |symbol|
    include(JumpIn::Authentication::Persistence
      .const_get(symbol.capitalize))
  end
end