module Flocks::Configuration
Configuration
settings for Flocks
.
Attributes
Key used in Redis for tracking who has blocked an individual.
Key used in Redis for tracking who an individual blocks.
Key used in Redis for tracking the followers of an individual.
Key used in Redis for tracking who an individual is following.
Flocks
namespace for Redis.
Page size to be used when paging through the various types of relationships.
Key used to indicate whether or not a follow should be pending or not.
Key used in Redis for tracking pending follow relationships for an individual.
Key used in Redis for tracking who an individual is awaiting approval from.
Key used in Redis for tracking who has reciprocated a follow for an individual.
Redis instance.
Set the percision for relationship sorting granularity
Public Instance Methods
Key used in Redis for tracking who has blocked an individual.
@return the key used in Redis for tracking who has blocked an individual or the default of ‘blocked_by’ if not set.
# File lib/flocks/configuration.rb, line 88 def blocked_by_key @blocked_by_key ||= 'blocked_by' end
Key used in Redis for tracking who an individual blocks.
@return the key used in Redis for tracking who an individual blocks or the default of ‘blocked’ if not set.
# File lib/flocks/configuration.rb, line 81 def blocked_key @blocked_key ||= 'blocked' end
Yield self to be able to configure Flocks
with block-style configuration.
Example:
Flocks.configure do |configuration| configuration.redis = Redis.new configuration.namespace = 'flocks' configuration.following_key = 'following' configuration.followers_key = 'followers' configuration.blocked_key = 'blocked' configuration.blocked_by_key = 'blocked_by' configuration.page_size = 25 end
# File lib/flocks/configuration.rb, line 53 def configure yield self end
Key used in Redis for tracking the followers of an individual.
@return the key used in Redis for tracking the followers of an individual or the default of ‘followers’ if not set.
# File lib/flocks/configuration.rb, line 74 def followers_key @followers_key ||= 'followers' end
Key used in Redis for tracking who an individual is following.
@return the key used in Redis for tracking who an individual is following or the default of ‘following’ if not set.
# File lib/flocks/configuration.rb, line 67 def following_key @following_key ||= 'following' end
Page size to be used when paging through the various types of relationships.
@return the page size to be used when paging through the various types of relationships or the default of 25 if not set.
# File lib/flocks/configuration.rb, line 102 def page_size @page_size ||= 25 end
Key used in Redis for tracking who has reciprocated a follow for an individual.
@return the key used in Redis for tracking who has reciprocated a follow for an individual or the default of ‘reciprocated’ if not set.
# File lib/flocks/configuration.rb, line 95 def reciprocated_key @reciprocated_key ||= 'reciprocated' end
Number of characters to be used when scoring a username for indexing in redis
@return the scoring percision
# File lib/flocks/configuration.rb, line 109 def string_score_percision @string_score_percision ||= 5 end