27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# File 'lib/rdoc/generator/solarfish.rb', line 27
def self.setup_options(rdoc_options)
rdoc_options.sf_htmlfile = Settings::DEFAULT_HTMLFILE
opt = rdoc_options.option_parser
opt.separator 'SolarFish generator options:'
opt.separator nil
opt.on('--sf-htmlfile=FILE', String,
'Set output HTML file name.',
"Defaults to '#{Settings::DEFAULT_HTMLFILE}'.") do |value|
rdoc_options.sf_htmlfile = value
end
opt.separator nil
opt.on('--sf-jsonfile=FILE', String,
'Set output JSON file name.',
'Empty by default.') do |value|
rdoc_options.sf_jsonfile = value
end
opt.separator nil
opt.on('--sf-template=NAME', String,
"Set template. Defaults to '#{Settings::DEFAULT_TEMPLATE}'.",
"If name contains slash, it's a path, and",
"otherwise it's a name of installed template.",
'Installed templates:',
*(TemplateLoader.templates_list
.map { |s| " - #{s}" })) do |value|
rdoc_options.sf_template = TemplateLoader.template_path(value)
end
opt.separator nil
opt.on('--sf-theme=NAME', String,
"Set theme. Defaults to '#{Settings::DEFAULT_THEME}'. Specify",
'multiple times to merge several themes. Every',
'next theme overwrites options set by previous',
"themes. If name contains slash, it's a path,",
"and otherwise it's a name of installed theme.",
'Installed themes:',
*(ThemeLoader.themes_list
.map { |s| " - #{s}" })) do |value|
rdoc_options.sf_themes ||= []
rdoc_options.sf_themes << ThemeLoader.theme_path(value)
end
opt.separator nil
opt.on('--sf-prefix=PREFIX', String,
'Set URL prefix for links to stylesheets and',
'scripts in generated HTML. Empty by default.') do |value|
rdoc_options.sf_prefix = value
end
opt.separator nil
opt.on('--sf-filter-classes=REGEX', String,
'Include only classes and modules that',
'match regex.') do |value|
rdoc_options.sf_filter_classes = Regexp.new(value)
end
opt.separator nil
opt.on('--sf-filter-members=REGEX', String,
'Include only members that match regex.') do |value|
rdoc_options.sf_filter_members = Regexp.new(value)
end
end
|