Class: Bitbucket::Representation::PullRequestComment

Inherits:
Comment
  • Object
show all
Defined in:
lib/bitbucket/representation/pull_request_comment.rb

Instance Attribute Summary

Attributes inherited from Base

#raw

Instance Method Summary collapse

Methods inherited from Comment

#author, #created_at, #note, #updated_at

Methods inherited from Base

decorate, #initialize

Constructor Details

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

Instance Method Details

#file_pathObject


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

def file_path
  inline.fetch('path')
end

#has_parent?Boolean

Returns:

  • (Boolean)

30
31
32
# File 'lib/bitbucket/representation/pull_request_comment.rb', line 30

def has_parent?
  raw.key?('parent')
end

#iidObject


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

def iid
  raw['id']
end

#inline?Boolean

Returns:

  • (Boolean)

26
27
28
# File 'lib/bitbucket/representation/pull_request_comment.rb', line 26

def inline?
  raw.key?('inline')
end

#new_posObject


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

def new_pos
  inline.fetch('to')
end

#old_posObject


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

def old_pos
  inline.fetch('from')
end

#parent_idObject


22
23
24
# File 'lib/bitbucket/representation/pull_request_comment.rb', line 22

def parent_id
  raw.fetch('parent', {}).fetch('id', nil)
end