Class: FSWatcher::Directory
Overview
The directory to watch
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Instance Method Summary collapse
- #getFiles ⇒ Object
-
#initialize(dir, expression) ⇒ Directory
constructor
A new instance of Directory.
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
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
305 306 307 |
# File 'lib/doozer/watcher.rb', line 305 def dir @dir end |
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
305 306 307 |
# File 'lib/doozer/watcher.rb', line 305 def expression @expression end |
Instance Method Details
#getFiles ⇒ Object
312 313 314 |
# File 'lib/doozer/watcher.rb', line 312 def getFiles() return Dir[@dir + "/" + @expression] end |