Class: MxxRu::Externals::Impl::WgetDownloder

Inherits:
Object
  • Object
show all
Includes:
OptionsHolder
Defined in:
lib/mxx_ru/externals.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from OptionsHolder

#option

Constructor Details

#initialize(options) ⇒ WgetDownloder

Returns a new instance of WgetDownloder.



154
155
156
# File 'lib/mxx_ru/externals.rb', line 154

def initialize(options)
  @options = options
end

Class Method Details

.check_presenceObject



146
147
148
# File 'lib/mxx_ru/externals.rb', line 146

def WgetDownloder.check_presence
  MxxRu::Helpers.external_tool_version_probe('wget --version', /^GNU Wget\s(\S+)\s/)
end

.downloader_idObject



150
151
152
# File 'lib/mxx_ru/externals.rb', line 150

def WgetDownloder.downloader_id
  :wget
end

Instance Method Details

#make_download_sh_args(uri, result_name) ⇒ Object



158
159
160
# File 'lib/mxx_ru/externals.rb', line 158

def make_download_sh_args(uri, result_name)
  push_options_to(['wget']).push('-O', result_name, uri)
end