Class: Dropio::Comment

Inherits:
Resource show all
Defined in:
lib/dropio/comment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Dropio::Resource

Instance Attribute Details

#assetObject

Returns the value of attribute asset.



3
4
5
# File 'lib/dropio/comment.rb', line 3

def asset
  @asset
end

#contentsObject

Returns the value of attribute contents.



3
4
5
# File 'lib/dropio/comment.rb', line 3

def contents
  @contents
end

#created_atObject

Returns the value of attribute created_at.



3
4
5
# File 'lib/dropio/comment.rb', line 3

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/dropio/comment.rb', line 3

def id
  @id
end

Instance Method Details

#destroyObject

Destroys the comment on drop.io. Don’t try to use an Comment after destroying it.



11
12
13
# File 'lib/dropio/comment.rb', line 11

def destroy
  Dropio::Client.instance.destroy_comment(self)
end

#saveObject

Saves the comment back to drop.io



6
7
8
# File 'lib/dropio/comment.rb', line 6

def save
  Dropio::Client.instance.save_comment(self)
end