module CommandKit::Help::Man::ClassMethods
Class-level methods.
Public Instance Methods
man_dir(new_man_dir=nil)
click to toggle source
Gets or sets the directory where man-pages are stored.
@param [String, nil] new_man_dir
If a String is given, it will set The class'es man-page directory.
@return [String, nil]
The class'es or superclass'es man-page directory.
@example
man_dir "#{__dir__}/../../man"
@api public
# File lib/command_kit/help/man.rb, line 71 def man_dir(new_man_dir=nil) if new_man_dir @man_dir = new_man_dir else @man_dir || if superclass.kind_of?(ClassMethods) superclass.man_dir end end end
man_page(new_man_page=nil)
click to toggle source
Gets or sets the class'es man-page file name.
@param [String, nil] new_man_page
If a String is given, the class'es man-page file name will be set.
@return [String]
The class'es or superclass'es man-page file name.
@api public
# 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