Module: Helper::Download

Included in:
Download
Defined in:
lib/skynet/helper.rb

Overview

Module for keeping download settings

Class Method Summary collapse

Class Method Details

.default_optionsObject

Default options for the download module



14
15
16
17
18
19
# File 'lib/skynet/helper.rb', line 14

def self.default_options
  {
    portal_url: Helper::PORTAL_URL,
    download: true
  }
end

.strip_prefix(str) ⇒ Object

Removes the Skynet::URI_SKYNET_PREFIX constant from string



22
23
24
25
26
27
28
29
30
# File 'lib/skynet/helper.rb', line 22

def self.strip_prefix(str)
  return nil if str.nil?

  if str.index(URI_SKYNET_PREFIX).nil?
    str
  else
    str.delete_prefix(URI_SKYNET_PREFIX)
  end
end