Class: Listen::Backend
- Inherits:
-
Object
- Object
- Listen::Backend
- Extended by:
- Forwardable
- Defined in:
- lib/listen/backend.rb
Instance Attribute Summary collapse
-
#min_delay_between_events ⇒ Object
readonly
Returns the value of attribute min_delay_between_events.
Instance Method Summary collapse
-
#initialize(directories, queue, silencer, config) ⇒ Backend
constructor
A new instance of Backend.
Constructor Details
#initialize(directories, queue, silencer, config) ⇒ Backend
Returns a new instance of Backend.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/listen/backend.rb', line 15 def initialize(directories, queue, silencer, config) adapter_select_opts = config. adapter_class = Adapter.select(adapter_select_opts) # Use default from adapter if possible @min_delay_between_events = config.min_delay_between_events @min_delay_between_events ||= adapter_class::DEFAULTS[:wait_for_delay] @min_delay_between_events ||= 0.1 adapter_opts = config.(adapter_class) aconfig = Adapter::Config.new(directories, queue, silencer, adapter_opts) @adapter = adapter_class.new(aconfig) end |
Instance Attribute Details
#min_delay_between_events ⇒ Object (readonly)
Returns the value of attribute min_delay_between_events.
34 35 36 |
# File 'lib/listen/backend.rb', line 34 def min_delay_between_events @min_delay_between_events end |