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.



5
6
7
8
9
10
11
# File 'lib/ninny/repository/pull_request.rb', line 5

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.



4
5
6
# File 'lib/ninny/repository/pull_request.rb', line 4

def branch
  @branch
end

#comment_lambdaObject

Returns the value of attribute comment_lambda.



4
5
6
# File 'lib/ninny/repository/pull_request.rb', line 4

def comment_lambda
  @comment_lambda
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/ninny/repository/pull_request.rb', line 4

def description
  @description
end

#numberObject

Returns the value of attribute number.



4
5
6
# File 'lib/ninny/repository/pull_request.rb', line 4

def number
  @number
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/ninny/repository/pull_request.rb', line 4

def title
  @title
end

Instance Method Details

#write_comment(body) ⇒ Object



13
14
15
# File 'lib/ninny/repository/pull_request.rb', line 13

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