Class: Bozo::Tools::Nuget
- Inherits:
-
Object
- Object
- Bozo::Tools::Nuget
- Defined in:
- lib/bozo/tools/nuget.rb
Instance Method Summary collapse
-
#initialize ⇒ Nuget
constructor
Creates a new instance.
-
#retrieve(destination_path) ⇒ Object
Retreives the nuget tool exe from the path.
-
#source(url) ⇒ Object
Sets the source url for the nuget tool to be retreived from.
Constructor Details
#initialize ⇒ Nuget
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
15 16 17 |
# File 'lib/bozo/tools/nuget.rb', line 15 def source(url) @url = url end |