Class: Confluence::Attachment
- Inherits:
-
Record
- Object
- Record
- Confluence::Attachment
- Extended by:
- Findable
- Defined in:
- lib/confluence/attachment.rb
Instance Attribute Summary (collapse)
Class Method Summary (collapse)
Instance Method Summary (collapse)
Instance Attribute Details
- (Object) data
14 15 16 |
# File 'lib/confluence/attachment.rb', line 14 def data @data ||= client.getAttachmentData(page_id, filename, "0") end |
Class Method Details
+ (Object) find_criteria(args)
30 31 32 33 34 |
# File 'lib/confluence/attachment.rb', line 30 def self.find_criteria(args) if args.key? :page_id and args.key? :filename self.new(client.getAttachment(args[:page_id], args[:filename], args[:version] || "0")) end end |
Instance Method Details
- (Object) remove
26 27 28 |
# File 'lib/confluence/attachment.rb', line 26 def remove client.removeAttachment(page_id, filename) end |
- (Object) store
18 19 20 21 22 23 24 |
# File 'lib/confluence/attachment.rb', line 18 def store # reinitialize attachment after storing it initialize(client.addAttachment(page_id, self.to_hash, XMLRPC::Base64.new(@data))) # return self self end |