Method: Hypembot::Bot#initialize
- Defined in:
- lib/hypembot.rb
#initialize(opts) ⇒ Bot
Returns a new instance of Bot.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/hypembot.rb', line 10 def initialize(opts) @source = opts[:source] || "#{ENV['HOME']}/Library/Caches/Google/Chrome/Default/Cache/" @dir = opts[:directory] || "#{ENV["HOME"]}/Music" @min_bitrate = opts[:bitrate] || 125 @min_length = opts[:length] || 60 @dw = DirectoryWatcher.new(@source, :scanner => :em, :pre_load => true, :glob => 'f_*', :stable => 18, :interval => 10) end |