Class: TentClient::Attachment
- Inherits:
-
Object
- Object
- TentClient::Attachment
- Defined in:
- lib/tent-client/attachment.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #get(entity, digest, params = {}, &block) ⇒ Object
-
#initialize(client) ⇒ Attachment
constructor
A new instance of Attachment.
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
#client ⇒ Object (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 |