class Cipherpipe::Commands::Download
Public Class Methods
call(configuration = nil)
click to toggle source
# File lib/cipherpipe/commands/download.rb, line 2 def self.call(configuration = nil) new(configuration).call end
new(configuration)
click to toggle source
# File lib/cipherpipe/commands/download.rb, line 6 def initialize(configuration) @configuration = configuration end
Public Instance Methods
call()
click to toggle source
# File lib/cipherpipe/commands/download.rb, line 10 def call puts "Downloading from #{external_source.type}" configuration.variables = external_source.download end
Private Instance Methods
configuration()
click to toggle source
# File lib/cipherpipe/commands/download.rb, line 17 def configuration @configuration ||= Cipherpipe::Configuration.new end
external_source()
click to toggle source
# File lib/cipherpipe/commands/download.rb, line 21 def external_source @external_source ||= configuration.external_sources.detect { |source| source.primary? } end