Class: MusicMetadataScore::Publisher

Inherits:
Object
  • Object
show all
Defined in:
lib/music_metadata_score/publisher.rb

Class Method Summary collapse

Class Method Details

.are_proper_format?(publishers) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
# File 'lib/music_metadata_score/publisher.rb', line 4

def self.are_proper_format?(publishers)
	if publishers && publishers != []
		MusicMetadataScore::Publisher.loop_publishers(publishers)
	else
		false
	end
end

.is_proper_format?(publisher) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
26
27
28
29
# File 'lib/music_metadata_score/publisher.rb', line 23

def self.is_proper_format?(publisher)
	if publisher && publisher != ""
		true
	else
		false
	end
end

.loop_publishers(publishers) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/music_metadata_score/publisher.rb', line 12

def self.loop_publishers(publishers)
	value = true
	publishers.each do |c|
		if !MusicMetadataScore::Publisher.is_proper_format?(c)
			value = false
			break
		end
	end
	value
end