Module: RedisPagination::Configuration
- Included in:
- RedisPagination
- Defined in:
- lib/redis_pagination/configuration.rb
Overview
Configuration settings for redis_pagination.
Instance Attribute Summary collapse
-
#page_size ⇒ Object
Page size to be used when peforming paging operations.
-
#redis ⇒ Object
Redis instance.
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Yield self to be able to configure redis_pagination with block-style configuration.
Instance Attribute Details
#page_size ⇒ Object
Page size to be used when peforming paging operations.
25 26 27 |
# File 'lib/redis_pagination/configuration.rb', line 25 def page_size @page_size ||= 25 end |
#redis ⇒ Object
Redis instance.
5 6 7 |
# File 'lib/redis_pagination/configuration.rb', line 5 def redis @redis end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
Yield self to be able to configure redis_pagination with block-style configuration.
Example:
RedisPagination.configure do |configuration|
configuration.redis = Redis.new
configuration.page_size = 25
end
18 19 20 |
# File 'lib/redis_pagination/configuration.rb', line 18 def configure yield self end |