Class: Sniffer::Config
- Inherits:
-
Anyway::Config
- Object
- Anyway::Config
- Sniffer::Config
- Defined in:
- lib/sniffer/config.rb
Overview
Sniffer configuration
Instance Method Summary collapse
Instance Method Details
#capacity ⇒ Object
29 30 31 |
# File 'lib/sniffer/config.rb', line 29 def capacity store.fetch(:capacity).to_i end |
#capacity? ⇒ Boolean
25 26 27 |
# File 'lib/sniffer/config.rb', line 25 def capacity? store.is_a?(Hash) && store.key?(:capacity) end |
#rotate? ⇒ Boolean
33 34 35 36 |
# File 'lib/sniffer/config.rb', line 33 def rotate? return false unless capacity? store.fetch(:rotate, true) end |