class Shutwork::Command::Base
Public Class Methods
new()
click to toggle source
# File lib/shutwork/command/base.rb, line 16 def initialize @shell = Thor::Shell::Color.new end
Public Instance Methods
download_file(url, dst, at = nil)
click to toggle source
# File lib/shutwork/command/base.rb, line 20 def download_file url, dst, at = nil FileUtils.mkdir_p dst.dirname open(url) do |i| open(dst, 'wb') do |o| o.write i.read end if at File.utime at, at, dst end end end