Class: Winwatch::Event

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

Overview

A frozen event. Struct supplies deconstruct/deconstruct_keys for pattern matching: event in {type: :renamed, from:, path:}.

type  - Symbol: :added :modified :removed :renamed :rescan :gone
path  - String, absolute, UTF-8, forward-slash separated (watch root for
      :rescan/:gone)
from  - String (old absolute path) for :renamed, else nil
code  - Integer Win32 error for :gone, else nil

Instance Attribute Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



62
63
64
# File 'lib/winwatch.rb', line 62

def code
  @code
end

#fromObject

Returns the value of attribute from

Returns:

  • (Object)

    the current value of from



62
63
64
# File 'lib/winwatch.rb', line 62

def from
  @from
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



62
63
64
# File 'lib/winwatch.rb', line 62

def path
  @path
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



62
63
64
# File 'lib/winwatch.rb', line 62

def type
  @type
end