Class: Michael::Models::RepositoryFormatter
- Inherits:
-
Object
- Object
- Michael::Models::RepositoryFormatter
- Defined in:
- lib/michael/models/repository_formatter.rb
Instance Method Summary collapse
-
#initialize(reponame, prs) ⇒ RepositoryFormatter
constructor
A new instance of RepositoryFormatter.
- #pretty ⇒ Object
Constructor Details
#initialize(reponame, prs) ⇒ RepositoryFormatter
Returns a new instance of RepositoryFormatter.
8 9 10 11 12 |
# File 'lib/michael/models/repository_formatter.rb', line 8 def initialize(reponame, prs) @reponame = reponame @prs = prs @pastel = Pastel.new end |
Instance Method Details
#pretty ⇒ Object
14 15 16 17 18 19 |
# File 'lib/michael/models/repository_formatter.rb', line 14 def pretty [ pastel.bold(reponame + ':'), prs.map { |pr| PullRequestFormatter.new(pr).pretty }.join("\n") ].join("\n") end |