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
61 62 63 |
# File 'lib/cash/index.rb', line 61 def buffer [:buffer] end |
#limit ⇒ Object
57 58 59 |
# File 'lib/cash/index.rb', line 57 def limit [:limit] end |
#order ⇒ Object
53 54 55 |
# File 'lib/cash/index.rb', line 53 def order @order ||= [:order] || :asc end |
#order_column ⇒ Object
69 70 71 |
# File 'lib/cash/index.rb', line 69 def order_column [:order_column] || 'id' end |
#ttl ⇒ Object
49 50 51 |
# File 'lib/cash/index.rb', line 49 def ttl @ttl ||= [:ttl] || config.ttl end |
#window ⇒ Object
65 66 67 |
# File 'lib/cash/index.rb', line 65 def window limit && limit + buffer end |