cli 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +5 -7
  3. data/Gemfile.lock +29 -37
  4. data/README.md +43 -44
  5. data/Rakefile +1 -28
  6. data/cli.gemspec +14 -84
  7. data/examples/httpclient +6 -6
  8. data/examples/ls +4 -4
  9. data/examples/processor +5 -5
  10. data/examples/sinatra +9 -9
  11. data/lib/cli/dsl.rb +3 -3
  12. data/rdoc/CLI/Arguments.html +178 -0
  13. data/rdoc/CLI/DSL/Argument.html +200 -0
  14. data/rdoc/CLI/DSL/Arguments.html +172 -0
  15. data/rdoc/CLI/DSL/Base.html +154 -0
  16. data/rdoc/CLI/DSL/Cast.html +152 -0
  17. data/rdoc/CLI/DSL/Description.html +150 -0
  18. data/rdoc/CLI/DSL/Input.html +143 -0
  19. data/rdoc/CLI/DSL/MultiDefault.html +151 -0
  20. data/rdoc/CLI/DSL/Option.html +143 -0
  21. data/rdoc/CLI/DSL/Options.html +142 -0
  22. data/rdoc/CLI/DSL/Switch.html +267 -0
  23. data/rdoc/CLI/DSL/Value.html +238 -0
  24. data/rdoc/CLI/DSL.html +91 -0
  25. data/rdoc/CLI/Options.html +200 -0
  26. data/rdoc/CLI/ParserError/ArgumentNameSpecifiedTwice.html +138 -0
  27. data/rdoc/CLI/ParserError/LongNameSpecifiedTwiceError.html +138 -0
  28. data/rdoc/CLI/ParserError/MultipleArgumentsSpecifierError.html +138 -0
  29. data/rdoc/CLI/ParserError/NameArgumetNotSymbolError.html +138 -0
  30. data/rdoc/CLI/ParserError/OptionsArgumentNotHashError.html +138 -0
  31. data/rdoc/CLI/ParserError/ShortNameIsInvalidError.html +138 -0
  32. data/rdoc/CLI/ParserError/ShortNameNotSymbolError.html +138 -0
  33. data/rdoc/CLI/ParserError/ShortNameSpecifiedTwiceError.html +138 -0
  34. data/rdoc/CLI/ParserError.html +97 -0
  35. data/rdoc/CLI/ParsingError/CastError.html +138 -0
  36. data/rdoc/CLI/ParsingError/MandatoryArgumentNotSpecifiedError.html +138 -0
  37. data/rdoc/CLI/ParsingError/MandatoryOptionsNotSpecifiedError.html +138 -0
  38. data/rdoc/CLI/ParsingError/MissingOptionValueError.html +138 -0
  39. data/rdoc/CLI/ParsingError/UnknownSwitchError.html +138 -0
  40. data/rdoc/CLI/ParsingError/UsageError.html +97 -0
  41. data/rdoc/CLI/ParsingError.html +97 -0
  42. data/rdoc/CLI/Switches.html +306 -0
  43. data/rdoc/CLI/Values.html +202 -0
  44. data/rdoc/CLI.html +652 -0
  45. data/rdoc/README_md.html +553 -0
  46. data/rdoc/created.rid +7 -0
  47. data/rdoc/css/fonts.css +167 -0
  48. data/rdoc/css/rdoc.css +639 -0
  49. data/rdoc/fonts/Lato-Light.ttf +0 -0
  50. data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
  51. data/rdoc/fonts/Lato-Regular.ttf +0 -0
  52. data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
  53. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  54. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  55. data/rdoc/images/add.png +0 -0
  56. data/rdoc/images/arrow_up.png +0 -0
  57. data/rdoc/images/brick.png +0 -0
  58. data/rdoc/images/brick_link.png +0 -0
  59. data/rdoc/images/bug.png +0 -0
  60. data/rdoc/images/bullet_black.png +0 -0
  61. data/rdoc/images/bullet_toggle_minus.png +0 -0
  62. data/rdoc/images/bullet_toggle_plus.png +0 -0
  63. data/rdoc/images/date.png +0 -0
  64. data/rdoc/images/delete.png +0 -0
  65. data/rdoc/images/find.png +0 -0
  66. data/rdoc/images/loadingAnimation.gif +0 -0
  67. data/rdoc/images/macFFBgHack.png +0 -0
  68. data/rdoc/images/package.png +0 -0
  69. data/rdoc/images/page_green.png +0 -0
  70. data/rdoc/images/page_white_text.png +0 -0
  71. data/rdoc/images/page_white_width.png +0 -0
  72. data/rdoc/images/plugin.png +0 -0
  73. data/rdoc/images/ruby.png +0 -0
  74. data/rdoc/images/tag_blue.png +0 -0
  75. data/rdoc/images/tag_green.png +0 -0
  76. data/rdoc/images/transparent.png +0 -0
  77. data/rdoc/images/wrench.png +0 -0
  78. data/rdoc/images/wrench_orange.png +0 -0
  79. data/rdoc/images/zoom.png +0 -0
  80. data/rdoc/index.html +120 -0
  81. data/rdoc/js/darkfish.js +84 -0
  82. data/rdoc/js/navigation.js +105 -0
  83. data/rdoc/js/navigation.js.gz +0 -0
  84. data/rdoc/js/search.js +110 -0
  85. data/rdoc/js/search_index.js +1 -0
  86. data/rdoc/js/search_index.js.gz +0 -0
  87. data/rdoc/js/searcher.js +229 -0
  88. data/rdoc/js/searcher.js.gz +0 -0
  89. data/rdoc/table_of_contents.html +533 -0
  90. data/spec/argument_spec.rb +122 -99
  91. data/spec/cli_spec.rb +27 -28
  92. data/spec/conflict_reporting_spec.rb +16 -17
  93. data/spec/option_spec.rb +79 -56
  94. data/spec/separator_spec.rb +19 -20
  95. data/spec/stdin_spec.rb +13 -14
  96. data/spec/switch_spec.rb +15 -16
  97. data/spec/usage_spec.rb +80 -81
  98. metadata +91 -104
  99. data/.document +0 -5
  100. data/.rspec +0 -1
  101. data/VERSION +0 -1
  102. data/features/cli.feature +0 -9
  103. data/features/step_definitions/cli_steps.rb +0 -0
  104. data/features/support/env.rb +0 -13
@@ -0,0 +1,267 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class CLI::DSL::Switch - cli 1.3.1</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../../";
11
+ var index_rel_prefix = "../../";
12
+ </script>
13
+
14
+ <script src="../../js/navigation.js" defer></script>
15
+ <script src="../../js/search.js" defer></script>
16
+ <script src="../../js/search_index.js" defer></script>
17
+ <script src="../../js/searcher.js" defer></script>
18
+ <script src="../../js/darkfish.js" defer></script>
19
+
20
+ <link href="../../css/fonts.css" rel="stylesheet">
21
+ <link href="../../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+ <body id="top" role="document" class="class">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../../table_of_contents.html#pages">Pages</a>
34
+ <a href="../../table_of_contents.html#classes">Classes</a>
35
+ <a href="../../table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+
61
+ <div id="parent-class-section" class="nav-section">
62
+ <h3>Parent</h3>
63
+
64
+ <p class="link"><a href="Base.html">CLI::DSL::Base</a>
65
+ </div>
66
+
67
+
68
+ <div id="includes-section" class="nav-section">
69
+ <h3>Included Modules</h3>
70
+
71
+ <ul class="link-list">
72
+ <li><a class="include" href="Description.html">CLI::DSL::Description</a>
73
+ </ul>
74
+ </div>
75
+
76
+
77
+
78
+ <!-- Method Quickref -->
79
+ <div id="method-list-section" class="nav-section">
80
+ <h3>Methods</h3>
81
+
82
+ <ul class="link-list" role="directory">
83
+ <li class="calls-super" ><a href="#method-c-new">::new</a>
84
+ <li ><a href="#method-i-has_short-3F">#has_short?</a>
85
+ <li ><a href="#method-i-short">#short</a>
86
+ <li ><a href="#method-i-switch">#switch</a>
87
+ <li ><a href="#method-i-switch_short">#switch_short</a>
88
+ <li ><a href="#method-i-to_s">#to_s</a>
89
+ </ul>
90
+ </div>
91
+
92
+ </div>
93
+ </nav>
94
+
95
+ <main role="main" aria-labelledby="class-CLI::DSL::Switch">
96
+ <h1 id="class-CLI::DSL::Switch" class="class">
97
+ class CLI::DSL::Switch
98
+ </h1>
99
+
100
+ <section class="description">
101
+
102
+ </section>
103
+
104
+ <section id="5Buntitled-5D" class="documentation-section">
105
+
106
+
107
+
108
+
109
+
110
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
111
+ <header>
112
+ <h3>Public Class Methods</h3>
113
+ </header>
114
+
115
+ <div id="method-c-new" class="method-detail ">
116
+ <div class="method-heading">
117
+ <span class="method-name">new</span><span
118
+ class="method-args">(name, options = {})</span>
119
+ <span class="method-click-advice">click to toggle source</span>
120
+ </div>
121
+
122
+ <div class="method-description">
123
+
124
+ <div class="method-calls-super">
125
+ Calls superclass method
126
+ <a href="Base.html#method-c-new"><code>CLI::DSL::Base::new</code></a>
127
+ </div>
128
+
129
+ <div class="method-source-code" id="new-source">
130
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 137</span>
131
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {})
132
+ <span class="ruby-keyword">super</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
133
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">short</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:short</span>]
134
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ParserError</span><span class="ruby-operator">::</span><span class="ruby-constant">ShortNameNotSymbolError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">short</span>) <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">short</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Symbol</span>
135
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ParserError</span><span class="ruby-operator">::</span><span class="ruby-constant">ShortNameIsInvalidError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">short</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">short</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
136
+ <span class="ruby-keyword">end</span>
137
+ <span class="ruby-keyword">end</span></pre>
138
+ </div>
139
+ </div>
140
+
141
+
142
+ </div>
143
+
144
+ </section>
145
+
146
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
147
+ <header>
148
+ <h3>Public Instance Methods</h3>
149
+ </header>
150
+
151
+ <div id="method-i-has_short-3F" class="method-detail ">
152
+ <div class="method-heading">
153
+ <span class="method-name">has_short?</span><span
154
+ class="method-args">()</span>
155
+ <span class="method-click-advice">click to toggle source</span>
156
+ </div>
157
+
158
+ <div class="method-description">
159
+
160
+
161
+ <div class="method-source-code" id="has_short-3F-source">
162
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 147</span>
163
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">has_short?</span>
164
+ <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">member?</span> <span class="ruby-value">:short</span>
165
+ <span class="ruby-keyword">end</span></pre>
166
+ </div>
167
+ </div>
168
+
169
+
170
+ </div>
171
+
172
+ <div id="method-i-short" class="method-detail ">
173
+ <div class="method-heading">
174
+ <span class="method-name">short</span><span
175
+ class="method-args">()</span>
176
+ <span class="method-click-advice">click to toggle source</span>
177
+ </div>
178
+
179
+ <div class="method-description">
180
+
181
+
182
+ <div class="method-source-code" id="short-source">
183
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 151</span>
184
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">short</span>
185
+ <span class="ruby-ivar">@options</span>[<span class="ruby-value">:short</span>]
186
+ <span class="ruby-keyword">end</span></pre>
187
+ </div>
188
+ </div>
189
+
190
+
191
+ </div>
192
+
193
+ <div id="method-i-switch" class="method-detail ">
194
+ <div class="method-heading">
195
+ <span class="method-name">switch</span><span
196
+ class="method-args">()</span>
197
+ <span class="method-click-advice">click to toggle source</span>
198
+ </div>
199
+
200
+ <div class="method-description">
201
+
202
+
203
+ <div class="method-source-code" id="switch-source">
204
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 155</span>
205
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">switch</span>
206
+ <span class="ruby-string">&#39;--&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-string">&#39;_&#39;</span>, <span class="ruby-string">&#39;-&#39;</span>)
207
+ <span class="ruby-keyword">end</span></pre>
208
+ </div>
209
+ </div>
210
+
211
+
212
+ </div>
213
+
214
+ <div id="method-i-switch_short" class="method-detail ">
215
+ <div class="method-heading">
216
+ <span class="method-name">switch_short</span><span
217
+ class="method-args">()</span>
218
+ <span class="method-click-advice">click to toggle source</span>
219
+ </div>
220
+
221
+ <div class="method-description">
222
+
223
+
224
+ <div class="method-source-code" id="switch_short-source">
225
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 159</span>
226
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">switch_short</span>
227
+ <span class="ruby-string">&#39;-&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">short</span>.<span class="ruby-identifier">to_s</span>
228
+ <span class="ruby-keyword">end</span></pre>
229
+ </div>
230
+ </div>
231
+
232
+
233
+ </div>
234
+
235
+ <div id="method-i-to_s" class="method-detail ">
236
+ <div class="method-heading">
237
+ <span class="method-name">to_s</span><span
238
+ class="method-args">()</span>
239
+ <span class="method-click-advice">click to toggle source</span>
240
+ </div>
241
+
242
+ <div class="method-description">
243
+
244
+
245
+ <div class="method-source-code" id="to_s-source">
246
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 163</span>
247
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span>
248
+ <span class="ruby-identifier">switch</span>
249
+ <span class="ruby-keyword">end</span></pre>
250
+ </div>
251
+ </div>
252
+
253
+
254
+ </div>
255
+
256
+ </section>
257
+
258
+ </section>
259
+ </main>
260
+
261
+
262
+ <footer id="validator-badges" role="contentinfo">
263
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
264
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
265
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
266
+ </footer>
267
+
@@ -0,0 +1,238 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module CLI::DSL::Value - cli 1.3.1</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../../";
11
+ var index_rel_prefix = "../../";
12
+ </script>
13
+
14
+ <script src="../../js/navigation.js" defer></script>
15
+ <script src="../../js/search.js" defer></script>
16
+ <script src="../../js/search_index.js" defer></script>
17
+ <script src="../../js/searcher.js" defer></script>
18
+ <script src="../../js/darkfish.js" defer></script>
19
+
20
+ <link href="../../css/fonts.css" rel="stylesheet">
21
+ <link href="../../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+ <body id="top" role="document" class="module">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../../table_of_contents.html#pages">Pages</a>
34
+ <a href="../../table_of_contents.html#classes">Classes</a>
35
+ <a href="../../table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+
61
+
62
+
63
+
64
+ <!-- Method Quickref -->
65
+ <div id="method-list-section" class="nav-section">
66
+ <h3>Methods</h3>
67
+
68
+ <ul class="link-list" role="directory">
69
+ <li ><a href="#method-i-default">#default</a>
70
+ <li ><a href="#method-i-default_cast">#default_cast</a>
71
+ <li ><a href="#method-i-default_label">#default_label</a>
72
+ <li ><a href="#method-i-has_default-3F">#has_default?</a>
73
+ <li ><a href="#method-i-has_default_label-3F">#has_default_label?</a>
74
+ <li ><a href="#method-i-mandatory-3F">#mandatory?</a>
75
+ </ul>
76
+ </div>
77
+
78
+ </div>
79
+ </nav>
80
+
81
+ <main role="main" aria-labelledby="module-CLI::DSL::Value">
82
+ <h1 id="module-CLI::DSL::Value" class="module">
83
+ module CLI::DSL::Value
84
+ </h1>
85
+
86
+ <section class="description">
87
+
88
+ </section>
89
+
90
+ <section id="5Buntitled-5D" class="documentation-section">
91
+
92
+
93
+
94
+
95
+
96
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
97
+ <header>
98
+ <h3>Public Instance Methods</h3>
99
+ </header>
100
+
101
+ <div id="method-i-default" class="method-detail ">
102
+ <div class="method-heading">
103
+ <span class="method-name">default</span><span
104
+ class="method-args">()</span>
105
+ <span class="method-click-advice">click to toggle source</span>
106
+ </div>
107
+
108
+ <div class="method-description">
109
+
110
+
111
+ <div class="method-source-code" id="default-source">
112
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 56</span>
113
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">default</span>
114
+ <span class="ruby-ivar">@options</span>[<span class="ruby-value">:default</span>].<span class="ruby-identifier">to_s</span>
115
+ <span class="ruby-keyword">end</span></pre>
116
+ </div>
117
+ </div>
118
+
119
+
120
+ </div>
121
+
122
+ <div id="method-i-default_cast" class="method-detail ">
123
+ <div class="method-heading">
124
+ <span class="method-name">default_cast</span><span
125
+ class="method-args">()</span>
126
+ <span class="method-click-advice">click to toggle source</span>
127
+ </div>
128
+
129
+ <div class="method-description">
130
+
131
+
132
+ <div class="method-source-code" id="default_cast-source">
133
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 60</span>
134
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">default_cast</span>
135
+ <span class="ruby-identifier">cast</span>(<span class="ruby-identifier">default</span>)
136
+ <span class="ruby-keyword">end</span></pre>
137
+ </div>
138
+ </div>
139
+
140
+
141
+ </div>
142
+
143
+ <div id="method-i-default_label" class="method-detail ">
144
+ <div class="method-heading">
145
+ <span class="method-name">default_label</span><span
146
+ class="method-args">()</span>
147
+ <span class="method-click-advice">click to toggle source</span>
148
+ </div>
149
+
150
+ <div class="method-description">
151
+
152
+
153
+ <div class="method-source-code" id="default_label-source">
154
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 68</span>
155
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">default_label</span>
156
+ <span class="ruby-ivar">@options</span>[<span class="ruby-value">:default_label</span>].<span class="ruby-identifier">to_s</span>
157
+ <span class="ruby-keyword">end</span></pre>
158
+ </div>
159
+ </div>
160
+
161
+
162
+ </div>
163
+
164
+ <div id="method-i-has_default-3F" class="method-detail ">
165
+ <div class="method-heading">
166
+ <span class="method-name">has_default?</span><span
167
+ class="method-args">()</span>
168
+ <span class="method-click-advice">click to toggle source</span>
169
+ </div>
170
+
171
+ <div class="method-description">
172
+
173
+
174
+ <div class="method-source-code" id="has_default-3F-source">
175
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 64</span>
176
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">has_default?</span>
177
+ <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">member?</span> <span class="ruby-value">:default</span>
178
+ <span class="ruby-keyword">end</span></pre>
179
+ </div>
180
+ </div>
181
+
182
+
183
+ </div>
184
+
185
+ <div id="method-i-has_default_label-3F" class="method-detail ">
186
+ <div class="method-heading">
187
+ <span class="method-name">has_default_label?</span><span
188
+ class="method-args">()</span>
189
+ <span class="method-click-advice">click to toggle source</span>
190
+ </div>
191
+
192
+ <div class="method-description">
193
+
194
+
195
+ <div class="method-source-code" id="has_default_label-3F-source">
196
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 72</span>
197
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">has_default_label?</span>
198
+ <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">member?</span> <span class="ruby-value">:default_label</span>
199
+ <span class="ruby-keyword">end</span></pre>
200
+ </div>
201
+ </div>
202
+
203
+
204
+ </div>
205
+
206
+ <div id="method-i-mandatory-3F" class="method-detail ">
207
+ <div class="method-heading">
208
+ <span class="method-name">mandatory?</span><span
209
+ class="method-args">()</span>
210
+ <span class="method-click-advice">click to toggle source</span>
211
+ </div>
212
+
213
+ <div class="method-description">
214
+
215
+
216
+ <div class="method-source-code" id="mandatory-3F-source">
217
+ <pre><span class="ruby-comment"># File lib/cli/dsl.rb, line 76</span>
218
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">mandatory?</span>
219
+ <span class="ruby-keyword">not</span> <span class="ruby-identifier">has_default?</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@options</span>[<span class="ruby-value">:required</span>]
220
+ <span class="ruby-keyword">end</span></pre>
221
+ </div>
222
+ </div>
223
+
224
+
225
+ </div>
226
+
227
+ </section>
228
+
229
+ </section>
230
+ </main>
231
+
232
+
233
+ <footer id="validator-badges" role="contentinfo">
234
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
235
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
236
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
237
+ </footer>
238
+
data/rdoc/CLI/DSL.html ADDED
@@ -0,0 +1,91 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module CLI::DSL - cli 1.3.1</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/navigation.js" defer></script>
15
+ <script src="../js/search.js" defer></script>
16
+ <script src="../js/search_index.js" defer></script>
17
+ <script src="../js/searcher.js" defer></script>
18
+ <script src="../js/darkfish.js" defer></script>
19
+
20
+ <link href="../css/fonts.css" rel="stylesheet">
21
+ <link href="../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+ <body id="top" role="document" class="module">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../table_of_contents.html#pages">Pages</a>
34
+ <a href="../table_of_contents.html#classes">Classes</a>
35
+ <a href="../table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+
61
+
62
+
63
+
64
+ </div>
65
+ </nav>
66
+
67
+ <main role="main" aria-labelledby="module-CLI::DSL">
68
+ <h1 id="module-CLI::DSL" class="module">
69
+ module CLI::DSL
70
+ </h1>
71
+
72
+ <section class="description">
73
+
74
+ </section>
75
+
76
+ <section id="5Buntitled-5D" class="documentation-section">
77
+
78
+
79
+
80
+
81
+
82
+ </section>
83
+ </main>
84
+
85
+
86
+ <footer id="validator-badges" role="contentinfo">
87
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
88
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
89
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
90
+ </footer>
91
+