github
0 of 18 new or added lines in 4 files covered. (0.0%)
3922 existing lines in 105 files now uncovered.0 of 4086 relevant lines covered (0.0%)
0.0 hits per line
1 |
# frozen_string_literal: true
|
|
2 |
|
|
3 |
# Base module for the available audio formats, such as MP3, Ogg or Flac.
|
|
UNCOV
4
|
module AudioEncoding |
× |
5 |
|
|
UNCOV
6
|
def self.[](codec) |
× |
UNCOV
7
|
registry[codec] |
× |
UNCOV
8
|
end
|
× |
9 |
|
|
UNCOV
10
|
def self.fetch(codec) |
× |
UNCOV
11
|
self[codec] || raise(ArgumentError, "Unknown codec #{codec}") |
× |
UNCOV
12
|
end
|
× |
13 |
|
|
UNCOV
14
|
def self.for_extension(file_extension) |
× |
UNCOV
15
|
list.detect { |e| e.file_extension == file_extension.to_s.strip } |
× |
UNCOV
16
|
end
|
× |
17 |
|
|
UNCOV
18
|
def self.list |
× |
UNCOV
19
|
registry.values |
× |
UNCOV
20
|
end
|
× |
21 |
|
|
UNCOV
22
|
def self.registry |
× |
UNCOV
23
|
@@registry ||= AudioEncoding::Base.subclasses.index_by(&:codec) |
× |
UNCOV
24
|
end
|
× |
25 |
|
|
UNCOV
26
|
end
|
× |
27 |
|
|
UNCOV
28
|
require_dependency 'audio_encoding/mp3'
|
× |
UNCOV
29
|
require_dependency 'audio_encoding/flac'
|
× |