Class: YoutubeAudio::Download

Inherits:
Object
  • Object
show all
Defined in:
lib/youtube_audio/download.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Download

Returns a new instance of Download.

Parameters:

  • url (String)

    youtube link



9
10
11
# File 'lib/youtube_audio/download.rb', line 9

def initialize(url)
  @url = url
end

Instance Attribute Details

#urlString (readonly)

Returns:

  • (String)


6
7
8
# File 'lib/youtube_audio/download.rb', line 6

def url
  @url
end

Instance Method Details

#formatsObject



13
14
15
# File 'lib/youtube_audio/download.rb', line 13

def formats
  @formats ||= Formats.new(url).formats
end