Module: Tracksperanto

Defined in:
lib/tracksperanto.rb

Defined Under Namespace

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

Constant Summary collapse

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

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.exportersObject

Returns the array of all exporter classes defined



19
20
21
# File 'lib/tracksperanto.rb', line 19

def exporters
  @exporters
end

.importersObject

Returns the array of all importer classes defined



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

def importers
  @importers
end

.toolsObject

Returns the array of all available tools



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

def tools
  @tools
end

Class Method Details

.exporter_namesObject

Returns the names of all the exporters



33
34
35
# File 'lib/tracksperanto.rb', line 33

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

.get_exporter(name) ⇒ Object

Case-insensitive search for an export module by name



70
71
72
73
74
75
76
# File 'lib/tracksperanto.rb', line 70

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



79
80
81
82
83
84
85
# File 'lib/tracksperanto.rb', line 79

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:



61
62
63
64
65
66
67
# File 'lib/tracksperanto.rb', line 61

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



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

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

.tool_namesObject

Returns the names of all the tools



38
39
40
# File 'lib/tracksperanto.rb', line 38

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