Sha256: c89862e2942e37e2ae5c3fbc45834e53db9d45bd2b5e2d6f943850fb77c0b910

Contents?: true

Size: 651 Bytes

Versions: 16

Compression:

Stored size: 651 Bytes

Contents

# frozen_string_literal: true

require 'pathname'

module Listen
  module Adapter
    class Config
      attr_reader :directories, :silencer, :queue, :adapter_options

      def initialize(directories, queue, silencer, adapter_options)
        # 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

        @silencer = silencer
        @queue = queue
        @adapter_options = adapter_options
      end
    end
  end
end

Version data entries

16 entries across 15 versions & 3 rubygems

Version Path
op_connect-0.1.2 vendor/bundle/ruby/3.1.0/gems/listen-3.7.1/lib/listen/adapter/config.rb
listen-3.7.1 lib/listen/adapter/config.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/listen-3.7.0/lib/listen/adapter/config.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/listen-3.7.0/lib/listen/adapter/config.rb
listen-3.7.0 lib/listen/adapter/config.rb
listen-3.6.0 lib/listen/adapter/config.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/listen-3.5.1/lib/listen/adapter/config.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/listen-3.3.3/lib/listen/adapter/config.rb
listen-3.5.1 lib/listen/adapter/config.rb
listen-3.5.0 lib/listen/adapter/config.rb
listen-3.4.1 lib/listen/adapter/config.rb
listen-3.4.0 lib/listen/adapter/config.rb
listen-3.3.4 lib/listen/adapter/config.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/listen-3.3.3/lib/listen/adapter/config.rb
listen-3.3.3 lib/listen/adapter/config.rb
listen-3.3.2 lib/listen/adapter/config.rb