module Helper::Download

Module for keeping download settings

Public Class Methods

default_options() click to toggle source

Default options for the download module

   # File lib/skynet/helper.rb
14 def self.default_options
15   {
16     portal_url: Helper::PORTAL_URL,
17     download: true
18   }
19 end
strip_prefix(str) click to toggle source

Removes the Skynet::URI_SKYNET_PREFIX constant from string

   # File lib/skynet/helper.rb
22 def self.strip_prefix(str)
23   return nil if str.nil?
24 
25   if str.index(URI_SKYNET_PREFIX).nil?
26     str
27   else
28     str.delete_prefix(URI_SKYNET_PREFIX)
29   end
30 end