Module: Tracksperanto

Defined in:
lib/tracksperanto.rb,
lib/tracksperanto/version.rb

Defined Under Namespace

Modules: BlockInit, Casts, ConstName, Export, Import, PFCoords, Parameters, Pipeline, Safety, ShakeGrammar, SimpleExport, Tool, UVCoordinates, ZipTuples Classes: Blacklist, BufferIO, ExtIO, FormatDetector, IOWrapper, Keyframe, Tracker, UnknownExporterError, UnknownImporterError, UnknownToolError, UnsupportedFormatError, YieldNonEmpty

Constant Summary collapse

PATH =
File.expand_path(File.dirname(__FILE__))
VERSION =
'4.2.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.exportersObject

Returns the array of all exporter classes defined



21
22
23
# File 'lib/tracksperanto.rb', line 21

def exporters
  @exporters
end

.importersObject

Returns the array of all importer classes defined



24
25
26
# File 'lib/tracksperanto.rb', line 24

def importers
  @importers
end

.toolsObject

Returns the array of all available tools



27
28
29
# File 'lib/tracksperanto.rb', line 27

def tools
  @tools
end

Class Method Details

.exporter_namesObject

Returns the names of all the exporters



35
36
37
# File 'lib/tracksperanto.rb', line 35

def exporter_names
  exporters.map{|e| e.const_name }
end

.get_exporter(name) ⇒ Object

Case-insensitive search for an export module by name



72
73
74
75
76
77
78
# File 'lib/tracksperanto.rb', line 72

def self.get_exporter(name)
  exporters.each do | x |
    return x if x.const_name.downcase == name.downcase
  end
  
  raise UnknownExporterError, "Unknown exporter #{name.inspect}"
end

.get_importer(name) ⇒ Object

Case-insensitive search for an export module by name



81
82
83
84
85
86
87
# File 'lib/tracksperanto.rb', line 81

def self.get_importer(name)
  importers.each do | x |
    return x if x.const_name.downcase == name.downcase
  end
  
  raise UnknownImporterError, "Unknown importer #{name.inspect}"
end

.get_tool(name) ⇒ Object

Case-insensitive search for a tool class by name

Raises:



63
64
65
66
67
68
69
# File 'lib/tracksperanto.rb', line 63

def self.get_tool(name)
  tools.each do | x |
    return x if x.const_name.downcase == name.downcase
  end
  
  raise UnknownToolError, "Unknown tool #{name.inspect}"
end

.importer_namesObject

Returns the names of all the importers



30
31
32
# File 'lib/tracksperanto.rb', line 30

def importer_names
  importers.map{|e| e.const_name }
end

.tool_namesObject

Returns the names of all the tools



40
41
42
# File 'lib/tracksperanto.rb', line 40

def tool_names
  tools.map{|e| e.const_name }
end