Class: Gem::Specification
- Inherits:
-
Object
- Object
- Gem::Specification
- Defined in:
- lib/rubygems/gem/specification.rb
Instance Method Summary collapse
-
#has_manpage?(section = nil) ⇒ Boolean
Does this specification include a manpage?.
-
#manpages(section = nil) ⇒ Object
Paths to the manpages included in this gem.
Instance Method Details
#has_manpage?(section = nil) ⇒ Boolean
Does this specification include a manpage?
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 |