Class: FSWatcher::Directory

Inherits:
Object show all
Defined in:
lib/doozer/watcher.rb

Overview

The directory to watch

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dir, expression) ⇒ Directory

Returns a new instance of Directory.



307
308
309
310
# File 'lib/doozer/watcher.rb', line 307

def initialize(dir, expression)
  @dir, @expression = dir, expression
  @dir.chop! if @dir =~ %r{/$}
end

Instance Attribute Details

#dirObject (readonly)

Returns the value of attribute dir.



305
306
307
# File 'lib/doozer/watcher.rb', line 305

def dir
  @dir
end

#expressionObject (readonly)

Returns the value of attribute expression.



305
306
307
# File 'lib/doozer/watcher.rb', line 305

def expression
  @expression
end

Instance Method Details

#getFilesObject



312
313
314
# File 'lib/doozer/watcher.rb', line 312

def getFiles()
  return Dir[@dir + "/" + @expression]
end