Class: Ehbrs::Tools::Runner::Music::Lyrics
- Inherits:
 - 
      Object
      
        
- Object
 - Ehbrs::Tools::Runner::Music::Lyrics
 
 
- Defined in:
 - lib/ehbrs/tools/runner/music/lyrics.rb
 
Constant Summary collapse
- DEFAULT_PROVIDER =
 'lyrics.com'
Instance Method Summary collapse
- #container_uncached ⇒ Object
 - #file ⇒ Object
 - #lyrics_uncached ⇒ Object
 - #output_content ⇒ Object
 - #provider_name ⇒ Object
 - #provider_uncached ⇒ Object
 - #run ⇒ Object
 - #show_results ⇒ Object
 - #start_banner ⇒ Object
 
Instance Method Details
#container_uncached ⇒ Object
      41 42 43  | 
    
      # File 'lib/ehbrs/tools/runner/music/lyrics.rb', line 41 def container_uncached ::EhbrsRubyUtils::Videos::File.from_file(file) end  | 
  
#file ⇒ Object
      45 46 47  | 
    
      # File 'lib/ehbrs/tools/runner/music/lyrics.rb', line 45 def file parsed.file.to_pathname end  | 
  
#lyrics_uncached ⇒ Object
      49 50 51  | 
    
      # File 'lib/ehbrs/tools/runner/music/lyrics.rb', line 49 def lyrics_uncached container.lyrics_by_provider(provider) end  | 
  
#output_content ⇒ Object
      53 54 55  | 
    
      # File 'lib/ehbrs/tools/runner/music/lyrics.rb', line 53 def output_content lyrics.text end  | 
  
#provider_name ⇒ Object
      61 62 63  | 
    
      # File 'lib/ehbrs/tools/runner/music/lyrics.rb', line 61 def provider_name parsed.provider end  | 
  
#provider_uncached ⇒ Object
      57 58 59  | 
    
      # File 'lib/ehbrs/tools/runner/music/lyrics.rb', line 57 def provider_uncached ::UltimateLyrics::Provider.by_name(provider_name) end  | 
  
#run ⇒ Object
      19 20 21 22  | 
    
      # File 'lib/ehbrs/tools/runner/music/lyrics.rb', line 19 def run show_results end  | 
  
#show_results ⇒ Object
      24 25 26 27 28 29 30 31  | 
    
      # File 'lib/ehbrs/tools/runner/music/lyrics.rb', line 24 def show_results if lyrics.found? success 'Lyrics found' run_output else fatal_error 'No lyric found' end end  | 
  
#start_banner ⇒ Object
      33 34 35 36 37 38 39  | 
    
      # File 'lib/ehbrs/tools/runner/music/lyrics.rb', line 33 def infov 'File', file %w[artist album track title year].each do |attr| infov attr.humanize, container.tag_file.tag.send(attr) end infov 'Selected provider', provider end  |