lib/tracksperanto.rb in tracksperanto-1.2.4 vs lib/tracksperanto.rb in tracksperanto-1.2.6

- old
+ new

@@ -2,11 +2,11 @@ require 'delegate' module Tracksperanto PATH = File.expand_path(File.dirname(__FILE__)) - VERSION = '1.2.4' + VERSION = '1.2.6' module Import; end module Export; end module Middleware; end module Pipeline; end @@ -21,17 +21,29 @@ # Returns the array of all available middlewares attr_accessor :middlewares # Returns the names of all the importers def importer_names - importers.map{|e| e.to_s.split('::').pop } + importers.map{|e| e.const_name } end + + # Returns the names of all the exporters + def exporter_names + exporters.map{|e| e.const_name } + end + + # Returns the names of all the middlewares + def middleware_names + middlewares.map{|e| e.const_name } + end + end + self.exporters, self.importers, self.middlewares = [], [], [] end -%w( casts block_init safety zip_tuples keyframe tracker format_detector).each do | submodule | +%w( const_name casts block_init safety zip_tuples keyframe tracker format_detector).each do | submodule | require File.join(Tracksperanto::PATH, "tracksperanto", submodule) end # Load importers Dir.glob(File.dirname(__FILE__) + '/import/*.rb').sort.each do | i | \ No newline at end of file