Sha256: b008f13230e0f53394663c91191bcdca29184abad3a1dbdf0d41fae05c2827cc

Contents?: true

Size: 671 Bytes

Versions: 55

Compression:

Stored size: 671 Bytes

Contents

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

55 entries across 48 versions & 9 rubygems

Version Path
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen/adapter/config.rb
gameboard-3.1.0 vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/config.rb
gameboard-3.0.0 vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/config.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/listen-3.1.5/lib/listen/adapter/config.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/listen-3.1.5/lib/listen/adapter/config.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/listen-3.1.5/lib/listen/adapter/config.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/listen-3.1.5/lib/listen/adapter/config.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/config.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/config.rb
listen-3.1.5 lib/listen/adapter/config.rb
listen-3.1.4 lib/listen/adapter/config.rb
listen-3.1.3 lib/listen/adapter/config.rb
listen-3.1.2 lib/listen/adapter/config.rb
listen-3.1.1 lib/listen/adapter/config.rb
listen-3.1.0 lib/listen/adapter/config.rb