Module: Socialite

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/migrations_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.6'

Class Method Summary (collapse)

Class Method Details

+ (Object) identity_class



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

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

+ (Object) identity_class_name



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

def self.identity_class_name
  @@identity_class.try(:camelize) || 'Identity'
end

+ (Object) provider(klass, *args)



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

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

+ (Object) providers



13
14
15
# File 'lib/socialite.rb', line 13

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

+ (Object) setup {|_self| ... }

Yields:

  • (_self)

Yield Parameters:

  • _self (Socialite)

    the object that the method was called on



7
8
9
# File 'lib/socialite.rb', line 7

def self.setup
  yield self if block_given?
end

+ (Object) user_class



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

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

+ (Object) user_class_name



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

def self.user_class_name
  @@user_class.try(:camelize) || 'User'
end