Class: Renderer::Metadata
Class Method Summary collapse
Class Method Details
.format_authors(authors) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/renderer/metadata.rb', line 5 def self.() return nil if .nil? || .count.zero? return .first if .length == 1 others = .count - 1 "#{.first}, and #{others} other#{others > 1 ? "s" : ""}" end |
.project_links(meta) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/renderer/metadata.rb', line 13 def self.project_links() links = [] links << { kind: "rubygems", href: [:host_url] } if .key?(:host_url) && ![:host_url].nil? if .key? :git_url links << if [:git_url].index("github.com/") { kind: "github", href: [:git_url] } else { kind: "git", href: [:git_url] } end end links end |