Class: Listen::Event::Config
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/event/config.rb
Instance Attribute Summary collapse
-
#event_queue ⇒ Object
readonly
Returns the value of attribute event_queue.
-
#listener ⇒ Object
readonly
Returns the value of attribute listener.
-
#min_delay_between_events ⇒ Object
readonly
Returns the value of attribute min_delay_between_events.
Instance Method Summary collapse
- #call(*args) ⇒ Object
- #callable? ⇒ Boolean
-
#initialize(listener, event_queue, queue_optimizer, wait_for_delay, &block) ⇒ Config
constructor
A new instance of Config.
- #optimize_changes(changes) ⇒ Object
- #sleep(seconds) ⇒ Object
Constructor Details
#initialize(listener, event_queue, queue_optimizer, wait_for_delay, &block) ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/event/config.rb', line 8 def initialize( listener, event_queue, queue_optimizer, wait_for_delay, &block ) @listener = listener @event_queue = event_queue @queue_optimizer = queue_optimizer @min_delay_between_events = wait_for_delay @block = block end |
Instance Attribute Details
#event_queue ⇒ Object (readonly)
Returns the value of attribute event_queue.
6 7 8 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/event/config.rb', line 6 def event_queue @event_queue end |
#listener ⇒ Object (readonly)
Returns the value of attribute listener.
6 7 8 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/event/config.rb', line 6 def listener @listener end |
#min_delay_between_events ⇒ Object (readonly)
Returns the value of attribute min_delay_between_events.
6 7 8 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/event/config.rb', line 6 def min_delay_between_events @min_delay_between_events end |
Instance Method Details
#call(*args) ⇒ Object
27 28 29 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/event/config.rb', line 27 def call(*args) @block&.call(*args) end |
#callable? ⇒ Boolean
31 32 33 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/event/config.rb', line 31 def callable? @block end |
#optimize_changes(changes) ⇒ Object
35 36 37 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/event/config.rb', line 35 def optimize_changes(changes) @queue_optimizer.smoosh_changes(changes) end |