lib/import/base.rb in tracksperanto-1.1.0 vs lib/import/base.rb in tracksperanto-1.1.1
- old
+ new
@@ -2,10 +2,12 @@
class Tracksperanto::Import::Base
include Tracksperanto::Safety
include Tracksperanto::Casts
+ attr_accessor :progress_block
+
# The original width of the tracked image
# Some importers need it
cast_to_int :width
# The original height of the original image.
@@ -16,9 +18,14 @@
safe_reader :width, :height
def self.inherited(by)
Tracksperanto.importers << by
super
+ end
+
+ # Call this method to tell what you are doing. This gets propagated to the caller
+ def report_progress(message)
+ @progress_block.call(message) if @progress_block
end
# Should return an array of Tracksperanto::Tracker objects
def parse(track_file_content)
[]
\ No newline at end of file