Class: Muvy::Download

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(media, options = {}) ⇒ Download

Returns a new instance of Download.



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

def initialize(media, options = {})
  @media = media
  @options = options
end

Instance Attribute Details

#mediaObject (readonly)

Returns the value of attribute media.



7
8
9
# File 'lib/muvy/download.rb', line 7

def media
  @media
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/muvy/download.rb', line 7

def options
  @options
end

#settingsObject (readonly)

Returns the value of attribute settings.



7
8
9
# File 'lib/muvy/download.rb', line 7

def settings
  @settings
end

Instance Method Details

#runObject



14
15
16
17
18
# File 'lib/muvy/download.rb', line 14

def run
  @settings = merge_settings
  download_video
  send_video
end