Class: Kicker::FSEvents::FSEvent
- Inherits:
-
Object
- Object
- Kicker::FSEvents::FSEvent
- Defined in:
- lib/kicker/fsevents.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #files ⇒ Object
-
#initialize(path) ⇒ FSEvent
constructor
A new instance of FSEvent.
Constructor Details
#initialize(path) ⇒ FSEvent
Returns a new instance of FSEvent.
10 11 12 |
# File 'lib/kicker/fsevents.rb', line 10 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/kicker/fsevents.rb', line 8 def path @path end |
Instance Method Details
#files ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/kicker/fsevents.rb', line 14 def files Dir.glob("#{File.(path)}/*").map do |filename| begin [File.mtime(filename), filename] rescue Errno::ENOENT nil end end.compact.sort.reverse.map { |_, filename| filename } end |