Class: Rerun::Watcher::Directory

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dirObject (readonly)

Returns the value of attribute dir.



167
168
169
# File 'lib/rerun/watcher.rb', line 167

def dir
  @dir
end

#expressionObject (readonly)

Returns the value of attribute expression.



167
168
169
# File 'lib/rerun/watcher.rb', line 167

def expression
  @expression
end

Instance Method Details

#filesObject



174
175
176
# File 'lib/rerun/watcher.rb', line 174

def files()
  return Dir["#{@dir}/#{@expression}"]
end