Class: OptionParser
- Inherits:
-
Object
show all
- Defined in:
- lib/rabbit/console/roff.rb
Defined Under Namespace
Classes: Category, List, Switch
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.roff_escape(str) ⇒ Object
80
81
82
83
|
# File 'lib/rabbit/console/roff.rb', line 80
def self.roff_escape(str)
str.gsub(/[-\\]/, '\\\\\\&').gsub(/^[.']/, '\\&') end
|
Instance Method Details
#category(str) ⇒ Object
76
77
78
|
# File 'lib/rabbit/console/roff.rb', line 76
def category(str)
top.append(Category.new(str), nil, nil)
end
|
#roff ⇒ Object
68
69
70
71
72
73
74
|
# File 'lib/rabbit/console/roff.rb', line 68
def roff
to = [%[.TH #{self.class.roff_escape(program_name.upcase)} "1"]]
visit(:summarize_as_roff) do |l|
to << l + $/
end
to
end
|