Module: Socialite

Includes:
ActiveSupport::Configurable
Defined in:
lib/socialite.rb,
lib/socialite/engine.rb,
lib/socialite/version.rb,
lib/socialite/models/user_concern.rb,
lib/socialite/controllers/helpers.rb,
lib/socialite/models/identity_concern.rb,
lib/generators/socialite/views_generator.rb,
lib/generators/socialite/install_generator.rb,
lib/generators/socialite/entities_generator.rb,
app/controllers/socialite/users_controller.rb,
app/controllers/socialite/sessions_controller.rb,
app/controllers/socialite/socialite_controller.rb

Defined Under Namespace

Modules: Controllers, Generators, Models Classes: Engine, SessionsController, SocialiteController, UsersController

Constant Summary

VERSION =
'0.1.0.pre.7'

Class Method Summary collapse

Class Method Details

.identity_classObject



43
44
45
# File 'lib/socialite.rb', line 43

def self.identity_class
  identity_class_name.try(:constantize)
end

.identity_class_nameObject



15
16
17
# File 'lib/socialite.rb', line 15

def self.identity_class_name
  @identity_class_name || 'Identity'
end

.identity_class_name=(name) ⇒ Object



23
24
25
# File 'lib/socialite.rb', line 23

def self.identity_class_name=(name)
  @identity_class_name = name
end

.provider(klass, *args) ⇒ Object



39
40
41
# File 'lib/socialite.rb', line 39

def self.provider(klass, *args)
  providers << [klass, args]
end

.providersObject



35
36
37
# File 'lib/socialite.rb', line 35

def self.providers;
  @providers ||= []
end

.providers=(providers) ⇒ Object



31
32
33
# File 'lib/socialite.rb', line 31

def self.providers=(providers)
  @providers = providers
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Socialite)

    the object that the method was called on



27
28
29
# File 'lib/socialite.rb', line 27

def self.setup
  yield self if block_given?
end

.user_classObject



47
48
49
# File 'lib/socialite.rb', line 47

def self.user_class
  user_class_name.try(:constantize)
end

.user_class_nameObject



11
12
13
# File 'lib/socialite.rb', line 11

def self.user_class_name
  @user_class_name || 'User'
end

.user_class_name=(name) ⇒ Object



19
20
21
# File 'lib/socialite.rb', line 19

def self.user_class_name=(name)
  @user_class_name = name
end