Class: Inotify::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/inotify/inotify_native.rb

Instance Method Summary collapse

Constructor Details

#initialize(struct, buf) ⇒ Event

Returns a new instance of Event.



81
82
83
# File 'lib/inotify/inotify_native.rb', line 81

def initialize(struct, buf)
  @struct, @buf = struct, buf
end

Instance Method Details

#inspectObject



93
94
95
96
97
98
99
100
# File 'lib/inotify/inotify_native.rb', line 93

def inspect
  "<%s name=%s mask=%s wd=%s>" % [
    self.class,
    self.name,
    self.mask,
    self.wd
  ]
end

#nameObject



89
90
91
# File 'lib/inotify/inotify_native.rb', line 89

def name
  @struct[:len] > 0 ? @buf.get_string(16, @struct[:len]) : ''
end