Class: Tools::Formats::Format
- Inherits:
-
Object
- Object
- Tools::Formats::Format
- Includes:
- Support::Manifest
- Defined in:
- lib/tools/formats/format.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
Class Method Summary collapse
-
.create_from_configuration(formats) ⇒ Array<Format>
Generate Format objects for all objects in the ‘formats` hash.
Instance Method Summary collapse
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
8 9 10 |
# File 'lib/tools/formats/format.rb', line 8 def files @files end |
Class Method Details
.create_from_configuration(formats) ⇒ Array<Format>
Generate Format objects for all objects in the ‘formats` hash
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/tools/formats/format.rb', line 13 def self.create_from_configuration(formats) initialized_formats = [] formats.each do |format_str, manifest_path| # Format prefixed with an F format_name = format_class_name(format_str) # Constantized name, namespaced to the current namespace format_class = namespaced_class(format_name) # Initialize a new Format object with the corresponding manifest format_object = format_class.new(manifest_path) # Add it to the array to be returned initialized_formats << format_object end initialized_formats end |
Instance Method Details
#key ⇒ Object
37 38 39 |
# File 'lib/tools/formats/format.rb', line 37 def key require_subclass end |
#transcode_command ⇒ Object
33 34 35 |
# File 'lib/tools/formats/format.rb', line 33 def transcode_command require_subclass end |