Module: CommandKit::Help::Man::ClassMethods
- Defined in:
- lib/command_kit/help/man.rb
Overview
Class-level methods.
Instance Method Summary collapse
-
#man_dir(new_man_dir = nil) ⇒ String?
Gets or sets the directory where man-pages are stored.
-
#man_page(new_man_page = nil) ⇒ String
Gets or sets the class'es man-page file name.
Instance Method Details
#man_dir(new_man_dir = nil) ⇒ String?
Gets or sets the directory where man-pages are stored.
71 72 73 74 75 76 77 78 79 |
# File 'lib/command_kit/help/man.rb', line 71 def man_dir(new_man_dir=nil) if new_man_dir @man_dir = File.(new_man_dir) else @man_dir || if superclass.kind_of?(ClassMethods) superclass.man_dir end end end |
#man_page(new_man_page = nil) ⇒ String
Gets or sets the class'es man-page file name.
92 93 94 95 96 97 98 |
# File 'lib/command_kit/help/man.rb', line 92 def man_page(new_man_page=nil) if new_man_page @man_page = new_man_page else @man_page || "#{command_name}.1" end end |