Class: Rerun::Watcher::Directory
- Inherits:
-
Object
- Object
- Rerun::Watcher::Directory
- Defined in:
- lib/rerun/watcher.rb
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
- #files ⇒ Object
-
#initialize(dir, expression) ⇒ Directory
constructor
A new instance of Directory.
Constructor Details
#initialize(dir, expression) ⇒ Directory
Returns a new instance of Directory.
169 170 171 172 |
# File 'lib/rerun/watcher.rb', line 169 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.
167 168 169 |
# File 'lib/rerun/watcher.rb', line 167 def dir @dir end |
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
167 168 169 |
# File 'lib/rerun/watcher.rb', line 167 def expression @expression end |
Instance Method Details
#files ⇒ Object
174 175 176 |
# File 'lib/rerun/watcher.rb', line 174 def files() return Dir["#{@dir}/#{@expression}"] end |