Class: Cipherpipe::Vault::Download

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(external_source) ⇒ Download

Returns a new instance of Download.



9
10
11
# File 'lib/cipherpipe/vault/download.rb', line 9

def initialize(external_source)
  @external_source = external_source
end

Class Method Details

.call(external_source) ⇒ Object



5
6
7
# File 'lib/cipherpipe/vault/download.rb', line 5

def self.call(external_source)
  new(external_source).call
end

Instance Method Details

#callObject



13
14
15
16
17
# File 'lib/cipherpipe/vault/download.rb', line 13

def call
  Cipherpipe::Vault::API.new(Vault.client).read(
    external_source.destination
  ).data
end