Module: Cash::Index::Attributes
- Included in:
- Cash::Index
- Defined in:
- lib/cash/index.rb
Instance Method Summary collapse
- #buffer ⇒ Object
- #limit ⇒ Object
- #order ⇒ Object
- #order_column ⇒ Object
- #ttl ⇒ Object
- #window ⇒ Object
Instance Method Details
#buffer ⇒ Object
60 61 62 |
# File 'lib/cash/index.rb', line 60 def buffer [:buffer] end |
#limit ⇒ Object
56 57 58 |
# File 'lib/cash/index.rb', line 56 def limit [:limit] end |
#order ⇒ Object
52 53 54 |
# File 'lib/cash/index.rb', line 52 def order @order ||= [:order] || :asc end |
#order_column ⇒ Object
68 69 70 |
# File 'lib/cash/index.rb', line 68 def order_column [:order_column] || 'id' end |
#ttl ⇒ Object
48 49 50 |
# File 'lib/cash/index.rb', line 48 def ttl @ttl ||= [:ttl] || config.ttl end |
#window ⇒ Object
64 65 66 |
# File 'lib/cash/index.rb', line 64 def window limit && limit + buffer end |