Module: Apple::Music::Library::Utils
- Included in:
- Library
- Defined in:
- lib/apple/music/library/utils.rb
Instance Method Summary collapse
Instance Method Details
#delimit(number) ⇒ Object
23 24 25 |
# File 'lib/apple/music/library/utils.rb', line 23 def delimit(number) number.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse end |
#dump ⇒ Object
27 28 29 |
# File 'lib/apple/music/library/utils.rb', line 27 def dump ap plist end |
#heading(text) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/apple/music/library/utils.rb', line 16 def heading(text) puts puts "---------------------------------------------------------------------------" puts "#{text} [#{delimit(songs.size)} songs]" puts "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" end |
#message(text) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/apple/music/library/utils.rb', line 9 def (text) return unless @verbose puts "---------------------------------------------------------------------------" puts "DEV MESSAGE @ #{Time.now.strftime('%H:%M:%S')} ::: #{text}" puts "---------------------------------------------------------------------------" end |