Class: Hearken::Indexing::Indexer
- Inherits:
-
Object
- Object
- Hearken::Indexing::Indexer
- Includes:
- Paths
- Defined in:
- lib/hearken/indexing/indexer.rb
Instance Attribute Summary
Attributes included from Paths
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(path) ⇒ Indexer
constructor
A new instance of Indexer.
Methods included from Paths
Constructor Details
#initialize(path) ⇒ Indexer
Returns a new instance of Indexer.
11 12 13 14 |
# File 'lib/hearken/indexing/indexer.rb', line 11 def initialize(path) create_paths @path = path end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/hearken/indexing/indexer.rb', line 16 def execute start = Time.now count = 0 traverser = Hearken::Indexing::PersistantTraverser.new @path, index_path traverser.each do |_audio_file| count += 1 show_progress start, count if (count % 1000).zero? end show_progress start, count system "afplay #{File.dirname(__FILE__)}/../../../media/applause.mp3" end |