Class: OptionParser::Category
- Inherits:
-
Object
- Object
- OptionParser::Category
- Defined in:
- lib/rabbit/console/roff.rb
Instance Method Summary collapse
-
#initialize(str) ⇒ Category
constructor
A new instance of Category.
- #summarize(*args) {|''| ... } ⇒ Object
- #summarize_as_roff {|".SH #{::OptionParser.roff_escape(@name)}"| ... } ⇒ Object
Constructor Details
#initialize(str) ⇒ Category
Returns a new instance of Category.
5 6 7 |
# File 'lib/rabbit/console/roff.rb', line 5 def initialize(str) @name = str end |
Instance Method Details
#summarize(*args) {|''| ... } ⇒ Object
9 10 11 12 |
# File 'lib/rabbit/console/roff.rb', line 9 def summarize(*args, &block) yield('') yield(@name) end |
#summarize_as_roff {|".SH #{::OptionParser.roff_escape(@name)}"| ... } ⇒ Object
14 15 16 |
# File 'lib/rabbit/console/roff.rb', line 14 def summarize_as_roff(&block) yield(".SH #{::OptionParser.roff_escape(@name)}") end |