tulios/nightcrawler_swift

View on GitHub
lib/nightcrawler_swift/commands/download.rb

Summary

Maintainability
A
0 mins
Test Coverage
module NightcrawlerSwift
  class Download < Command

    def execute path
      if path.nil? or path.empty?
        raise Exceptions::ValidationError.new "Download command requires a path parameter"
      end

      response = get "#{connection.internal_url}/#{options.bucket}/#{path}"
      response.body
    end

  end
end