Class: FireflyServer::FileWatcher::ChangeEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/firefly_server/file_watcher.rb

Constant Summary collapse

CATEGORIES =
%w[ ignored modified added removed ]

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ ChangeEvent



57
58
59
60
61
# File 'lib/firefly_server/file_watcher.rb', line 57

def initialize(params)
  params.each do |key, value|
    send("#{key}=", value)
  end
end

Instance Method Details

#to_hObject



68
69
70
# File 'lib/firefly_server/file_watcher.rb', line 68

def to_h
  CATEGORIES.map { |category| [category.to_sym, send(category)] }.to_h
end