Class: MusicMetadataScore::Composer
- Inherits:
-
Object
- Object
- MusicMetadataScore::Composer
- Defined in:
- lib/music_metadata_score/composer.rb
Class Method Summary collapse
- .are_proper_format?(composers) ⇒ Boolean
- .is_proper_format?(composer) ⇒ Boolean
- .loop_composers(composers) ⇒ Object
Class Method Details
.are_proper_format?(composers) ⇒ Boolean
4 5 6 7 8 9 10 |
# File 'lib/music_metadata_score/composer.rb', line 4 def self.are_proper_format?(composers) if composers && composers != [] MusicMetadataScore::Composer.loop_composers(composers) else false end end |
.is_proper_format?(composer) ⇒ Boolean
23 24 25 26 27 28 29 |
# File 'lib/music_metadata_score/composer.rb', line 23 def self.is_proper_format?(composer) if MusicMetadataScore::Contributor.is_human_name?(composer) && MusicMetadataScore.is_title_case?(composer) && !MusicMetadataScore::Artist.is_compound_artist?(composer, false) true else false end end |
.loop_composers(composers) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/music_metadata_score/composer.rb', line 12 def self.loop_composers(composers) value = true composers.each do |c| if !MusicMetadataScore::Composer.is_proper_format?(c) value = false break end end value end |