Class: Gem::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygems/gem/specification.rb

Instance Method Summary collapse

Instance Method Details

#has_manpage?(section = nil) ⇒ Boolean

Does this specification include a manpage?

Returns:

  • (Boolean)


3
4
5
# File 'lib/rubygems/gem/specification.rb', line 3

def has_manpage?(section = nil)
  manpages(section).any?
end

#manpages(section = nil) ⇒ Object

Paths to the manpages included in this gem.



8
9
10
11
12
# File 'lib/rubygems/gem/specification.rb', line 8

def manpages(section = nil)
  @files.select do |file|
    file =~ /man\/(.+).#{section || '\d'}$/
  end
end