Sha256: e7bb952c53d0c28bd4a7e8d5605cffc3c4764d1615e49166df614214644dad6d

Contents?: true

Size: 702 Bytes

Versions: 15

Compression:

Stored size: 702 Bytes

Contents

# frozen_string_literal: true

require 'pathname'

module Listen
  module Adapter
    class Config
      attr_reader :directories
      attr_reader :silencer
      attr_reader :queue
      attr_reader :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

15 entries across 15 versions & 2 rubygems

Version Path
qiita_org-0.1.35 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
qiita_org-0.1.34 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
qiita_org-0.1.33 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
qiita_org-0.1.32 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
qiita_org-0.1.31 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
qiita_org-0.1.30 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
qiita_org-0.1.29 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
qiita_org-0.1.28 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
qiita_org-0.1.27 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
qiita_org-0.1.26 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
qiita_org-0.1.25 gems/ruby/2.7.0/gems/listen-3.3.1/lib/listen/adapter/config.rb
listen-3.3.1 lib/listen/adapter/config.rb
listen-3.3.0 lib/listen/adapter/config.rb
listen-3.3.0.pre.3 lib/listen/adapter/config.rb
listen-3.3.0.pre.2 lib/listen/adapter/config.rb