class Arroyo::Service
Attributes
client[R]
Public Class Methods
new(client)
click to toggle source
# File lib/arroyo/service.rb, line 7 def initialize(client) @client = client end
Public Instance Methods
download(key) { |stream| ... }
click to toggle source
# File lib/arroyo/service.rb, line 11 def download(key) client.get(key) do |response| if response.status.ok? yield Stream.new(response.body) else raise Error, "Unexpected response status" end end end