Module: Socialization

Defined in:
lib/socialization/version.rb,
lib/socialization/actors/liker.rb,
lib/socialization/config/config.rb,
lib/socialization/lib/exceptions.rb,
lib/socialization/actors/follower.rb,
lib/socialization/actors/mentioner.rb,
lib/socialization/stores/redis/base.rb,
lib/socialization/stores/redis/like.rb,
lib/socialization/subjects/likeable.rb,
lib/socialization/stores/mixins/base.rb,
lib/socialization/stores/mixins/like.rb,
lib/socialization/stores/redis/config.rb,
lib/socialization/stores/redis/follow.rb,
lib/socialization/subjects/followable.rb,
lib/socialization/stores/mixins/follow.rb,
lib/socialization/stores/redis/mention.rb,
lib/socialization/subjects/mentionable.rb,
lib/socialization/stores/mixins/mention.rb,
lib/socialization/helpers/acts_as_helpers.rb,
lib/socialization/stores/redis/mixins/base.rb,
lib/socialization/stores/active_record/like.rb,
lib/socialization/stores/active_record/follow.rb,
lib/socialization/stores/active_record/mention.rb,
lib/socialization/stores/active_record/mixins/base.rb

Defined Under Namespace

Modules: ActiveRecordStores, ActsAsHelpers, Followable, Follower, Likeable, Liker, Mentionable, Mentioner, RedisStores, Stores Classes: ArgumentError

Constant Summary collapse

VERSION =
"2.0.2"

Class Method Summary collapse

Class Method Details

.follow_modelObject



3
4
5
6
7
8
9
# File 'lib/socialization/config/config.rb', line 3

def follow_model
  if @follow_model
    @follow_model
  else
    ::Follow
  end
end

.follow_model=(klass) ⇒ Object



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

def follow_model=(klass)
  @follow_model = klass
end

.like_modelObject



15
16
17
18
19
20
21
# File 'lib/socialization/config/config.rb', line 15

def like_model
  if @like_model
    @like_model
  else
    ::Like
  end
end

.like_model=(klass) ⇒ Object



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

def like_model=(klass)
  @like_model = klass
end

.mention_modelObject



27
28
29
30
31
32
33
# File 'lib/socialization/config/config.rb', line 27

def mention_model
  if @mention_model
    @mention_model
  else
    ::Mention
  end
end

.mention_model=(klass) ⇒ Object



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

def mention_model=(klass)
  @mention_model = klass
end

.redisObject



3
4
5
# File 'lib/socialization/stores/redis/config.rb', line 3

def redis
  @redis ||= Redis.new
end

.redis=(redis) ⇒ Object



7
8
9
# File 'lib/socialization/stores/redis/config.rb', line 7

def redis=(redis)
  @redis = redis
end