Class: ManBook::Formatter
- Inherits:
-
Object
- Object
- ManBook::Formatter
- Defined in:
- lib/manbook/formatter.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(man_page) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(man_page) ⇒ Formatter
Returns a new instance of Formatter.
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/manbook/formatter.rb', line 3 def initialize(man_page) @man_page = man_page begin @man_page_file = execute("man -w #{man_page}").chomp! rescue ManBook::CommandFailedError => e raise ManBook::ManPageNotFoundError.new(e.msg) end ManBook.logger.debug("Located man page at #{@man_page_file}") end |