Class: TentClient::Attachment

Inherits:
Object
  • Object
show all
Defined in:
lib/tent-client/attachment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Attachment

Returns a new instance of Attachment.



4
5
6
7
# File 'lib/tent-client/attachment.rb', line 4

def initialize(client)
  @client = client.dup
  @client.faraday_adapter = :net_http_stream
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/tent-client/attachment.rb', line 3

def client
  @client
end

Instance Method Details

#get(entity, digest, params = {}, &block) ⇒ Object



9
10
11
# File 'lib/tent-client/attachment.rb', line 9

def get(entity, digest, params = {}, &block)
  client.http.get(:attachment, { :entity => entity, :digest => digest }.merge(params), &block)
end