Class: Bitbucket::Representation::Comment

Inherits:
Base
  • Object
show all
Defined in:
lib/bitbucket/representation/comment.rb

Direct Known Subclasses

PullRequestComment

Instance Attribute Summary

Attributes inherited from Base

#raw

Instance Method Summary collapse

Methods inherited from Base

decorate, #initialize

Constructor Details

This class inherits a constructor from Bitbucket::Representation::Base

Instance Method Details

#authorObject



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

def author
  user['nickname']
end

#created_atObject



14
15
16
# File 'lib/bitbucket/representation/comment.rb', line 14

def created_at
  raw['created_on']
end

#noteObject



10
11
12
# File 'lib/bitbucket/representation/comment.rb', line 10

def note
  raw.fetch('content', {}).fetch('raw', nil)
end

#updated_atObject



18
19
20
# File 'lib/bitbucket/representation/comment.rb', line 18

def updated_at
  raw['updated_on'] || raw['created_on']
end