Skip to content

Commit

Permalink
Add Float64 type
Browse files Browse the repository at this point in the history
  • Loading branch information
faustinoaq authored Apr 30, 2017
1 parent 5cd2bf5 commit 8b3497a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/watcher.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Watcher
property status = false, files = {} of String => String
getter interval

def initialize(@interval : Int32)
def initialize(@interval : Int32 | Float64)
end

# Allow to yield a block when a file changes
Expand Down Expand Up @@ -36,7 +36,7 @@ module Watcher
end

# Allow to watch file changes using Watcher.watch
def self.watch(files, interval : Int32 | Float64 = 1)
def self.watch(files, interval = 1)
event = WatchEvent.new(interval)
loop do
event = scanner(files, event)
Expand All @@ -48,7 +48,7 @@ module Watcher
end

# Allow to watch file changes
def watch(files, interval : Int32 | Float64 = 1)
def watch(files, interval = 1)
Watcher.watch(files, interval) do |event|
yield event
end
Expand Down

0 comments on commit 8b3497a

Please sign in to comment.