rtfm 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -2,9 +2,17 @@ module RTFM
2
2
  class SynopsisSection
3
3
  def initialize
4
4
  @options = []
5
+ @arguments = []
5
6
  yield self if block_given?
6
7
  end
7
8
 
9
+ def add_argument(*args)
10
+ @arguments.concat args
11
+ end
12
+ alias_method :add_arguments, :add_argument
13
+ alias_method :argument, :add_argument
14
+ alias_method :arguments, :add_argument
15
+
8
16
  def add_option(*args)
9
17
  if args.size == 1 && args.first.is_a?(Option)
10
18
  then @options << args.first
@@ -35,6 +43,9 @@ module RTFM
35
43
  long_args.each do |opt|
36
44
  out << opt.to_groff(:option)
37
45
  end
46
+ @arguments.each do |arg|
47
+ out.Ar arg
48
+ end
38
49
  end
39
50
  end
40
51
  end
@@ -1,7 +1,6 @@
1
1
  require 'rubygems/command_manager'
2
2
 
3
3
  require 'rubygems/command'
4
- require 'rubygems_analyzer'
5
4
 
6
5
  class Gem::Commands::ManCommand < Gem::Command
7
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtfm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Edgar