Class: OptionParser::Category

Inherits:
Object
  • Object
show all
Defined in:
lib/rabbit/console/roff.rb

Instance Method Summary collapse

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

Yields:

  • ('')

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

Yields:


14
15
16
# File 'lib/rabbit/console/roff.rb', line 14

def summarize_as_roff(&block)
  yield(".SH #{::OptionParser.roff_escape(@name)}")
end