Class: Linterbot::TTYPullRequestCommenter
- Inherits:
-
Object
- Object
- Linterbot::TTYPullRequestCommenter
- Defined in:
- lib/linterbot/tty_pull_request_commenter.rb
Instance Attribute Summary collapse
-
#pull_request_number ⇒ Object
Returns the value of attribute pull_request_number.
-
#repository ⇒ Object
Returns the value of attribute repository.
Instance Method Summary collapse
-
#initialize(repository, pull_request_number, github_client) ⇒ TTYPullRequestCommenter
constructor
A new instance of TTYPullRequestCommenter.
- #publish_comment(comment) ⇒ Object
- #publish_summary(summary) ⇒ Object
Constructor Details
#initialize(repository, pull_request_number, github_client) ⇒ TTYPullRequestCommenter
Returns a new instance of TTYPullRequestCommenter.
8 9 10 11 |
# File 'lib/linterbot/tty_pull_request_commenter.rb', line 8 def initialize(repository, pull_request_number, github_client) @repository = repository @pull_request_number = pull_request_number end |
Instance Attribute Details
#pull_request_number ⇒ Object
Returns the value of attribute pull_request_number.
6 7 8 |
# File 'lib/linterbot/tty_pull_request_commenter.rb', line 6 def pull_request_number @pull_request_number end |
#repository ⇒ Object
Returns the value of attribute repository.
5 6 7 |
# File 'lib/linterbot/tty_pull_request_commenter.rb', line 5 def repository @repository end |
Instance Method Details
#publish_comment(comment) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/linterbot/tty_pull_request_commenter.rb', line 13 def publish_comment(comment) puts "#{repository}##{pull_request_number}" puts "#{comment.sha} - #{comment.file}" puts "#{comment.severity} - #{comment.}" puts "" end |
#publish_summary(summary) ⇒ Object
20 21 22 |
# File 'lib/linterbot/tty_pull_request_commenter.rb', line 20 def publish_summary(summary) puts summary end |