Class: Yt::PlaylistAudit::Description

Inherits:
Object
  • Object
show all
Defined in:
lib/yt/playlist_audit/description.rb

Overview

Count how many playlists have its description.

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Description


5
6
7
# File 'lib/yt/playlist_audit/description.rb', line 5

def initialize(options={})
  @playlists = options[:playlists]
end

Instance Method Details

#descriptionObject


21
22
23
# File 'lib/yt/playlist_audit/description.rb', line 21

def description
  'The number of playlists with description'
end

#titleObject


17
18
19
# File 'lib/yt/playlist_audit/description.rb', line 17

def title
  'Playlist Description'
end

#total_countObject


9
10
11
# File 'lib/yt/playlist_audit/description.rb', line 9

def total_count
  @playlists.size
end

#valid_countObject


13
14
15
# File 'lib/yt/playlist_audit/description.rb', line 13

def valid_count
  @playlists.count {|playlist| valid? playlist}
end