module ActivityFeed::Configuration
Configuration
settings for ActivityFeed
.
Attributes
Indicates whether or not aggregation is enabled.
Key used in Redis for an individual’s aggregate feed.
Proc that will be called for loading items from an ORM (e.g. ActiveRecord) or ODM (e.g. Mongoid). Proc will be called with the IDs of the items from the feed.
ActivityFeed
namespace for Redis.
Page size to be used when paging through the activity feed.
Redis instance.
Public Instance Methods
Indicates whether or not aggregation is enabled.
@return whether or not aggregation is enabled or the default of false
if not set.
# File lib/activity_feed/configuration.rb, line 50 def aggregate @aggregate ||= false end
Key used in Redis for an individul’s aggregate feed.
@return the key used in Redis for an individual’s aggregate feed or the default of ‘aggregate’ if not set.
# File lib/activity_feed/configuration.rb, line 57 def aggregate_key @aggregate_key ||= 'aggregate' end
Yield self to be able to configure ActivityFeed
with block-style configuration.
Example:
ActivityFeed.configure do |configuration| configuration.redis = Redis.new configuration.namespace = 'activity_feed' configuration.aggregate = false configuration.aggregate_key = 'aggregate' configuration.page_size = 25 end
# File lib/activity_feed/configuration.rb, line 36 def configure yield self end
ActivityFeed
namespace for Redis.
@return the ActivityFeed
namespace or the default of ‘activity_feed’ if not set.
# File lib/activity_feed/configuration.rb, line 43 def namespace @namespace ||= 'activity_feed' end
Default page size.
@return the page size or the default of 25 if not set.
# File lib/activity_feed/configuration.rb, line 64 def page_size @page_size ||= 25 end