Parent

Included Modules

Listen::Record

Attributes

listener[RW]
paths[RW]

Public Class Methods

new(listener) click to toggle source
# File lib/listen/record.rb, line 7
def initialize(listener)
  @listener = listener
  @paths    = _init_paths
end

Public Instance Methods

build() click to toggle source
# File lib/listen/record.rb, line 28
def build
  @paths = _init_paths
  listener.directories.each do |path|
    Actor[:listen_change_pool].change(path, type: 'Dir', recursive: true, silence: true)
  end
end
dir_entries(path) click to toggle source
# File lib/listen/record.rb, line 24
def dir_entries(path)
  @paths[path.to_s]
end
file_data(path) click to toggle source
# File lib/listen/record.rb, line 20
def file_data(path)
  @paths[::File.dirname(path)][::File.basename(path)] || {}
end
set_path(path, data) click to toggle source
# File lib/listen/record.rb, line 12
def set_path(path, data)
  @paths[::File.dirname(path)][::File.basename(path)] = file_data(path).merge(data)
end
unset_path(path) click to toggle source
# File lib/listen/record.rb, line 16
def unset_path(path)
  @paths[::File.dirname(path)].delete(::File.basename(path))
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.