Sha256: 9171fa2dc478e3b17c60abb46d6a0eb7f63b90b58340367cab469b3d4f95c44f
Contents?: true
Size: 568 Bytes
Versions: 1
Compression:
Stored size: 568 Bytes
Contents
module Reponaut module Application class Presenter def format(repo) line = repo.name line = "#{line} -> #{repo.upstream}" if repo.fork? line end end class SimplePresenter < Presenter; end class LongPresenter < Presenter attr_reader :count def initialize super @count = 0 end def format(repo) line = super line = "\n#{line}" unless @count == 0 line = "#{line}\n #{repo.description}" @count += 1 line end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reponaut-2.0.0 | lib/reponaut/presenter.rb |