Class: VagrantReflect::Util::Excludes

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-reflect/util/excludes.rb

Overview

This is a helper that builds the required commands and returns them

Constant Summary collapse

PATTERNS =
[
  ['.', '\\.'],
  ['***', '|||EMPTY|||'],
  ['**', '|||GLOBAL|||'],
  ['*', '|||PATH|||'],
  ['?', '[^/]'],
  ['|||PATH|||', '[^/]+'],
  ['|||GLOBAL|||', '.+'],
  ['|||EMPTY|||', '.*']
].freeze

Class Method Summary collapse

Class Method Details

.convert(excludes) ⇒ Object

This converts the rsync exclude patterns to regular expressions we can send to Listen.



19
20
21
# File 'lib/vagrant-reflect/util/excludes.rb', line 19

def convert(excludes)
  excludes.map(&method(:convert_single))
end