Class: IML::Normalizer
- Inherits:
-
Object
- Object
- IML::Normalizer
- Defined in:
- lib/iml/normalizer.rb
Instance Method Summary collapse
- #call(attrs) ⇒ Object
-
#initialize(config) ⇒ Normalizer
constructor
A new instance of Normalizer.
Constructor Details
#initialize(config) ⇒ Normalizer
Returns a new instance of Normalizer.
4 5 6 |
# File 'lib/iml/normalizer.rb', line 4 def initialize(config) @config = config end |
Instance Method Details
#call(attrs) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/iml/normalizer.rb', line 8 def call(attrs) attrs = attrs.transform_keys(&:to_sym) attrs = normalize_video_codec(attrs) attrs = normalize_audio_codec(attrs) attrs = normalize_source(attrs) attrs = normalize_titles(attrs) remove_blank_values(attrs) end |