Class: Ninny::Repository::PullRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/ninny/repository/pull_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ PullRequest

Returns a new instance of PullRequest.



8
9
10
11
12
13
14
# File 'lib/ninny/repository/pull_request.rb', line 8

def initialize(opts = {})
  self.number = opts[:number]
  self.title = opts[:title]
  self.description = opts[:description]
  self.branch = opts[:branch]
  self.comment_lambda = opts[:comment_lambda]
end

Instance Attribute Details

#branchObject

Returns the value of attribute branch.



6
7
8
# File 'lib/ninny/repository/pull_request.rb', line 6

def branch
  @branch
end

#comment_lambdaObject

Returns the value of attribute comment_lambda.



6
7
8
# File 'lib/ninny/repository/pull_request.rb', line 6

def comment_lambda
  @comment_lambda
end

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/ninny/repository/pull_request.rb', line 6

def description
  @description
end

#numberObject

Returns the value of attribute number.



6
7
8
# File 'lib/ninny/repository/pull_request.rb', line 6

def number
  @number
end

#titleObject

Returns the value of attribute title.



6
7
8
# File 'lib/ninny/repository/pull_request.rb', line 6

def title
  @title
end

Instance Method Details

#write_comment(body) ⇒ Object



16
17
18
# File 'lib/ninny/repository/pull_request.rb', line 16

def write_comment(body)
  comment_lambda.call(body)
end