Class: Tagomatic::Tagger
- Inherits:
-
Object
- Object
- Tagomatic::Tagger
- Includes:
- KnownFormats, Tags
- Defined in:
- lib/tagomatic/tagger.rb
Constant Summary
Constants included from KnownFormats
KnownFormats::INFIXES, KnownFormats::KNOWN_FORMATS, KnownFormats::PREFIXES, KnownFormats::SUFFIXES
Constants included from Tags
Tagomatic::Tags::FORMAT_ID_ALBUM, Tagomatic::Tags::FORMAT_ID_ALBUM_AGAIN, Tagomatic::Tags::FORMAT_ID_ARTIST, Tagomatic::Tags::FORMAT_ID_ARTIST_AGAIN, Tagomatic::Tags::FORMAT_ID_DISC, Tagomatic::Tags::FORMAT_ID_EXTENDED_WHITESPACE, Tagomatic::Tags::FORMAT_ID_GENRE, Tagomatic::Tags::FORMAT_ID_IGNORE, Tagomatic::Tags::FORMAT_ID_SURROUNDED_YEAR, Tagomatic::Tags::FORMAT_ID_TITLE, Tagomatic::Tags::FORMAT_ID_TRACKNUM, Tagomatic::Tags::FORMAT_ID_WHITESPACE, Tagomatic::Tags::FORMAT_ID_YEAR, Tagomatic::Tags::FORMAT_REGEXP_ALBUM, Tagomatic::Tags::FORMAT_REGEXP_ALBUM_AGAIN, Tagomatic::Tags::FORMAT_REGEXP_ARTIST, Tagomatic::Tags::FORMAT_REGEXP_ARTIST_AGAIN, Tagomatic::Tags::FORMAT_REGEXP_DISC, Tagomatic::Tags::FORMAT_REGEXP_EXTENDED_WHITESPACE, Tagomatic::Tags::FORMAT_REGEXP_GENRE, Tagomatic::Tags::FORMAT_REGEXP_IGNORE, Tagomatic::Tags::FORMAT_REGEXP_SURROUNDED_YEAR, Tagomatic::Tags::FORMAT_REGEXP_TITLE, Tagomatic::Tags::FORMAT_REGEXP_TRACKNUM, Tagomatic::Tags::FORMAT_REGEXP_WHITESPACE, Tagomatic::Tags::FORMAT_REGEXP_YEAR
Instance Method Summary collapse
-
#initialize(options, compiler, tags_processor_chain, mp3info, info_updater_factory, logger) ⇒ Tagger
constructor
A new instance of Tagger.
- #process!(file_path) ⇒ Object
Methods included from KnownFormats
Constructor Details
#initialize(options, compiler, tags_processor_chain, mp3info, info_updater_factory, logger) ⇒ Tagger
Returns a new instance of Tagger.
15 16 17 18 19 20 21 22 |
# File 'lib/tagomatic/tagger.rb', line 15 def initialize(, compiler, , mp3info, info_updater_factory, logger) @options = @compiler = compiler @tags_processor_chain = @mp3info = mp3info @info_updater_factory = info_updater_factory @logger = logger end |
Instance Method Details
#process!(file_path) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/tagomatic/tagger.rb', line 24 def process!(file_path) @logger.verbose "tagging #{file_path}" prepare_for_current_file(file_path) replace_underscores if @options[:underscores] apply_formats run_processor_chain try_updating_mp3file end |