rdoc-view 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rdoc-view/version.rb +1 -1
- data/lib/rdoc-view.rb +5 -3
- metadata +1 -1
data/lib/rdoc-view/version.rb
CHANGED
data/lib/rdoc-view.rb
CHANGED
@@ -93,12 +93,14 @@ module RDocView
|
|
93
93
|
end
|
94
94
|
|
95
95
|
# ファイル監視
|
96
|
-
|
97
|
-
|
96
|
+
callback = Proc.new do |modified, added, removed|
|
97
|
+
if modified.include?(settings.target_file) || added.include?(settings.target_file) then
|
98
98
|
send_func.call()
|
99
99
|
end
|
100
100
|
end
|
101
|
-
listener.
|
101
|
+
listener = Listen.to(File.dirname(settings.target_file), :relative_paths => false)
|
102
|
+
.change(&callback)
|
103
|
+
.start
|
102
104
|
|
103
105
|
# 簡易的なTimer。定期的にPingを飛ばす。
|
104
106
|
th_timer = Thread.new() do
|