Class: Bozo::Tools::Nuget

Inherits:
Object
  • Object
show all
Defined in:
lib/bozo/tools/nuget.rb

Instance Method Summary collapse

Constructor Details

#initializeNuget

Creates a new instance.



7
8
9
# File 'lib/bozo/tools/nuget.rb', line 7

def initialize
  @url = 'https://nuget.org/nuget.exe'
end

Instance Method Details

#retrieve(destination_path) ⇒ Object

Retreives the nuget tool exe from the path



20
21
22
23
24
# File 'lib/bozo/tools/nuget.rb', line 20

def retrieve(destination_path)
  open(File.join(destination_path, 'nuget.exe'), 'wb') do |file|
    file << open(@url).read
  end
end

#source(url) ⇒ Object

Sets the source url for the nuget tool to be retreived from

Parameters:

  • url (String)

    A web server hosting the nuget tool



15
16
17
# File 'lib/bozo/tools/nuget.rb', line 15

def source(url)
  @url = url
end