Class: DirectoryWatcher::FileStat

Inherits:
Struct
  • Object
show all
Defined in:
lib/directory_watcher.rb

Overview

:stopdoc: A persistable file stat structure used internally by the directory watcher.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mtimeObject

Returns the value of attribute mtime

Returns:

  • (Object)

    the current value of mtime



233
234
235
# File 'lib/directory_watcher.rb', line 233

def mtime
  @mtime
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



233
234
235
# File 'lib/directory_watcher.rb', line 233

def size
  @size
end

#stableObject

Returns the value of attribute stable

Returns:

  • (Object)

    the current value of stable



233
234
235
# File 'lib/directory_watcher.rb', line 233

def stable
  @stable
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


234
235
236
237
# File 'lib/directory_watcher.rb', line 234

def eql?( other )
  return false unless other.instance_of? FileStat
  self.mtime == other.mtime and self.size == other.size
end