Class: Listen::Adapter::Config
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/adapter/config.rb
Instance Attribute Summary collapse
-
#adapter_options ⇒ Object
readonly
Returns the value of attribute adapter_options.
-
#directories ⇒ Object
readonly
Returns the value of attribute directories.
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
-
#silencer ⇒ Object
readonly
Returns the value of attribute silencer.
Instance Method Summary collapse
-
#initialize(directories, queue, silencer, adapter_options) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(directories, queue, silencer, adapter_options) ⇒ Config
Returns a new instance of Config.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/adapter/config.rb', line 10 def initialize(directories, queue, silencer, ) # Default to current directory if no directories are supplied directories = [Dir.pwd] if directories.to_a.empty? # TODO: fix (flatten, array, compact?) @directories = directories.map do |directory| Pathname.new(directory.to_s).realpath end @directories.each do |pathname| unless pathname.directory? fail ArgumentError, "must be a directory: #{pathname}" end end @silencer = silencer @queue = queue @adapter_options = end |
Instance Attribute Details
#adapter_options ⇒ Object (readonly)
Returns the value of attribute adapter_options.
8 9 10 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/adapter/config.rb', line 8 def @adapter_options end |
#directories ⇒ Object (readonly)
Returns the value of attribute directories.
8 9 10 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/adapter/config.rb', line 8 def directories @directories end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
8 9 10 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/adapter/config.rb', line 8 def queue @queue end |
#silencer ⇒ Object (readonly)
Returns the value of attribute silencer.
8 9 10 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/listen-3.8.0/lib/listen/adapter/config.rb', line 8 def silencer @silencer end |