rubybreaker 0.0.4 → 0.0.5

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 (97) hide show
  1. data/NEWS +5 -0
  2. data/NOTES +9 -0
  3. data/README.md +100 -183
  4. data/Rakefile +21 -6
  5. data/VERSION +1 -1
  6. data/bin/rubybreaker +34 -50
  7. data/lib/rubybreaker/debug/debug.rb +6 -0
  8. data/lib/rubybreaker/doc/rdoc.rb +37 -0
  9. data/lib/rubybreaker/doc.rb +3 -0
  10. data/lib/rubybreaker/runtime/inspector.rb +6 -28
  11. data/lib/rubybreaker/runtime/monitor.rb +21 -17
  12. data/lib/rubybreaker/runtime/object_wrapper.rb +7 -2
  13. data/lib/rubybreaker/runtime/type_system.rb +3 -5
  14. data/lib/rubybreaker/runtime/typesig_unparser.rb +1 -4
  15. data/lib/rubybreaker/runtime.rb +64 -105
  16. data/lib/rubybreaker/task.rb +97 -0
  17. data/lib/rubybreaker/test/rspec.rb +1 -1
  18. data/lib/rubybreaker/test/testcase.rb +13 -28
  19. data/lib/rubybreaker/type/type.rb +1 -1
  20. data/lib/rubybreaker/typing/subtyping.rb +10 -5
  21. data/lib/rubybreaker/util.rb +0 -1
  22. data/lib/rubybreaker.rb +163 -115
  23. data/test/integrated/tc_both_broken_breakable.rb +5 -4
  24. data/test/integrated/tc_class_methods.rb +4 -3
  25. data/test/integrated/tc_inherit_broken.rb +4 -3
  26. data/test/integrated/tc_method_missing.rb +4 -4
  27. data/test/integrated/tc_namespace.rb +4 -2
  28. data/test/integrated/tc_simple1.rb +4 -3
  29. data/test/runtime/tc_obj_wrapper.rb +25 -6
  30. data/test/runtime/tc_typesig_parser.rb +0 -1
  31. data/test/testtask/sample.rb +10 -0
  32. data/test/testtask/tc_testtask.rb +25 -0
  33. data/test/ts_rspec.rb +21 -15
  34. data/test/typing/tc_typing.rb +2 -3
  35. data/webpage/index.html +105 -193
  36. data/webpage/rdoc/Kernel.html +286 -0
  37. data/webpage/rdoc/Object.html +17 -11
  38. data/webpage/rdoc/Rake/RubyBreakerTestTask.html +374 -0
  39. data/webpage/rdoc/Rake.html +212 -0
  40. data/webpage/rdoc/RubyBreaker/Breakable.html +24 -40
  41. data/webpage/rdoc/RubyBreaker/Broken.html +21 -69
  42. data/webpage/rdoc/RubyBreaker/Context.html +16 -10
  43. data/webpage/rdoc/RubyBreaker/Errors/InternalError.html +16 -10
  44. data/webpage/rdoc/RubyBreaker/Errors/InvalidSubtypeCheck.html +16 -10
  45. data/webpage/rdoc/RubyBreaker/Errors/InvalidTypeConstruction.html +16 -10
  46. data/webpage/rdoc/RubyBreaker/Errors/SubtypeFailure.html +16 -10
  47. data/webpage/rdoc/RubyBreaker/Errors/TypeError.html +16 -10
  48. data/webpage/rdoc/RubyBreaker/Errors/UserError.html +16 -10
  49. data/webpage/rdoc/RubyBreaker/Errors.html +16 -10
  50. data/webpage/rdoc/RubyBreaker/ObjectPosition.html +16 -10
  51. data/webpage/rdoc/RubyBreaker/Position.html +16 -10
  52. data/webpage/rdoc/RubyBreaker/{TestCase.html → RDocSupport.html} +81 -82
  53. data/webpage/rdoc/RubyBreaker/RubyTypeUtils.html +16 -10
  54. data/webpage/rdoc/RubyBreaker/Runtime/Inspector.html +25 -44
  55. data/webpage/rdoc/RubyBreaker/Runtime/MethodInfo.html +16 -10
  56. data/webpage/rdoc/RubyBreaker/Runtime/Monitor.html +19 -13
  57. data/webpage/rdoc/RubyBreaker/Runtime/MonitorInstaller.html +37 -25
  58. data/webpage/rdoc/RubyBreaker/Runtime/MonitorSwitch.html +20 -14
  59. data/webpage/rdoc/RubyBreaker/Runtime/MonitorUtils.html +21 -15
  60. data/webpage/rdoc/RubyBreaker/Runtime/ObjectWrapper.html +23 -12
  61. data/webpage/rdoc/RubyBreaker/Runtime/Pluggable.html +16 -10
  62. data/webpage/rdoc/RubyBreaker/Runtime/TypeSigParser.html +16 -10
  63. data/webpage/rdoc/RubyBreaker/Runtime/{TypesigUnparser.html → TypeSigUnparser.html} +19 -16
  64. data/webpage/rdoc/RubyBreaker/Runtime/TypeSystem.html +18 -14
  65. data/webpage/rdoc/RubyBreaker/Runtime.html +145 -11
  66. data/webpage/rdoc/RubyBreaker/TypeComparer.html +16 -10
  67. data/webpage/rdoc/RubyBreaker/TypeDefs/AnyType.html +16 -10
  68. data/webpage/rdoc/RubyBreaker/TypeDefs/BlockType.html +16 -10
  69. data/webpage/rdoc/RubyBreaker/TypeDefs/DuckType.html +16 -10
  70. data/webpage/rdoc/RubyBreaker/TypeDefs/FusionType.html +16 -10
  71. data/webpage/rdoc/RubyBreaker/TypeDefs/MethodListType.html +16 -10
  72. data/webpage/rdoc/RubyBreaker/TypeDefs/MethodType.html +16 -10
  73. data/webpage/rdoc/RubyBreaker/TypeDefs/NilType.html +16 -10
  74. data/webpage/rdoc/RubyBreaker/TypeDefs/NominalType.html +16 -10
  75. data/webpage/rdoc/RubyBreaker/TypeDefs/OptionalType.html +16 -10
  76. data/webpage/rdoc/RubyBreaker/TypeDefs/OrType.html +16 -10
  77. data/webpage/rdoc/RubyBreaker/TypeDefs/SelfType.html +17 -11
  78. data/webpage/rdoc/RubyBreaker/TypeDefs/Type.html +17 -11
  79. data/webpage/rdoc/RubyBreaker/TypeDefs/VarLengthType.html +16 -10
  80. data/webpage/rdoc/RubyBreaker/TypeDefs.html +16 -10
  81. data/webpage/rdoc/RubyBreaker/TypeUnparser.html +16 -10
  82. data/webpage/rdoc/RubyBreaker/Typing.html +17 -11
  83. data/webpage/rdoc/RubyBreaker/Util.html +16 -10
  84. data/webpage/rdoc/RubyBreaker.html +167 -34
  85. data/webpage/rdoc/{RubyBreaker/Runtime/TypePlaceholder.html → Test/Unit/TestCase.html} +68 -39
  86. data/webpage/rdoc/Test/Unit.html +211 -0
  87. data/webpage/rdoc/Test.html +211 -0
  88. data/webpage/rdoc/created.rid +18 -17
  89. data/webpage/rdoc/index.html +16 -10
  90. data/webpage/rdoc/js/search_index.js +1 -1
  91. data/webpage/rdoc/table_of_contents.html +61 -48
  92. metadata +21 -12
  93. data/lib/rubybreaker/rubylib/core.rb +0 -2483
  94. data/lib/rubybreaker/rubylib.rb +0 -3
  95. data/lib/rubybreaker/runtime/type_placeholder.rb +0 -23
  96. data/webpage/rdoc/RubyBreaker/Broken/BrokenEigen.html +0 -305
  97. data/webpage/rdoc/RubyBreaker/Main.html +0 -458
@@ -96,8 +96,6 @@
96
96
 
97
97
  <li><a href="../RubyBreaker/Broken.html">RubyBreaker::Broken</a>
98
98
 
99
- <li><a href="../RubyBreaker/Broken/BrokenEigen.html">RubyBreaker::Broken::BrokenEigen</a>
100
-
101
99
  <li><a href="../RubyBreaker/Context.html">RubyBreaker::Context</a>
102
100
 
103
101
  <li><a href="../RubyBreaker/Errors.html">RubyBreaker::Errors</a>
@@ -114,12 +112,12 @@
114
112
 
115
113
  <li><a href="../RubyBreaker/Errors/UserError.html">RubyBreaker::Errors::UserError</a>
116
114
 
117
- <li><a href="../RubyBreaker/Main.html">RubyBreaker::Main</a>
118
-
119
115
  <li><a href="../RubyBreaker/ObjectPosition.html">RubyBreaker::ObjectPosition</a>
120
116
 
121
117
  <li><a href="../RubyBreaker/Position.html">RubyBreaker::Position</a>
122
118
 
119
+ <li><a href="../RubyBreaker/RDocSupport.html">RubyBreaker::RDocSupport</a>
120
+
123
121
  <li><a href="../RubyBreaker/RubyTypeUtils.html">RubyBreaker::RubyTypeUtils</a>
124
122
 
125
123
  <li><a href="../RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
@@ -140,15 +138,11 @@
140
138
 
141
139
  <li><a href="../RubyBreaker/Runtime/Pluggable.html">RubyBreaker::Runtime::Pluggable</a>
142
140
 
143
- <li><a href="../RubyBreaker/Runtime/TypePlaceholder.html">RubyBreaker::Runtime::TypePlaceholder</a>
144
-
145
141
  <li><a href="../RubyBreaker/Runtime/TypeSigParser.html">RubyBreaker::Runtime::TypeSigParser</a>
146
142
 
147
- <li><a href="../RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
148
-
149
- <li><a href="../RubyBreaker/Runtime/TypesigUnparser.html">RubyBreaker::Runtime::TypesigUnparser</a>
143
+ <li><a href="../RubyBreaker/Runtime/TypeSigUnparser.html">RubyBreaker::Runtime::TypeSigUnparser</a>
150
144
 
151
- <li><a href="../RubyBreaker/TestCase.html">RubyBreaker::TestCase</a>
145
+ <li><a href="../RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
152
146
 
153
147
  <li><a href="../RubyBreaker/TypeComparer.html">RubyBreaker::TypeComparer</a>
154
148
 
@@ -186,6 +180,18 @@
186
180
 
187
181
  <li><a href="../RubyBreaker/Util.html">RubyBreaker::Util</a>
188
182
 
183
+ <li><a href="../Test.html">Test</a>
184
+
185
+ <li><a href="../Test/Unit.html">Test::Unit</a>
186
+
187
+ <li><a href="../Test/Unit/TestCase.html">Test::Unit::TestCase</a>
188
+
189
+ <li><a href="../Rake.html">Rake</a>
190
+
191
+ <li><a href="../Rake/RubyBreakerTestTask.html">Rake::RubyBreakerTestTask</a>
192
+
193
+ <li><a href="../Kernel.html">Kernel</a>
194
+
189
195
  <li><a href="../Object.html">Object</a>
190
196
 
191
197
  </ul>
@@ -248,7 +254,7 @@ href="TypeDefs.html">TypeDefs</a></em> module for more detail.</p>
248
254
 
249
255
 
250
256
  <div class="method-source-code" id="subtype_rel-3F-source">
251
- <pre><span class="ruby-comment"># File lib/rubybreaker/typing/subtyping.rb, line 435</span>
257
+ <pre><span class="ruby-comment"># File lib/rubybreaker/typing/subtyping.rb, line 440</span>
252
258
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">subtype_rel?</span>(<span class="ruby-identifier">lhs</span>, <span class="ruby-identifier">rhs</span>)
253
259
 
254
260
  <span class="ruby-comment"># Don't even bother if they are same object or syntactically</span>
@@ -86,8 +86,6 @@
86
86
 
87
87
  <li><a href="../RubyBreaker/Broken.html">RubyBreaker::Broken</a>
88
88
 
89
- <li><a href="../RubyBreaker/Broken/BrokenEigen.html">RubyBreaker::Broken::BrokenEigen</a>
90
-
91
89
  <li><a href="../RubyBreaker/Context.html">RubyBreaker::Context</a>
92
90
 
93
91
  <li><a href="../RubyBreaker/Errors.html">RubyBreaker::Errors</a>
@@ -104,12 +102,12 @@
104
102
 
105
103
  <li><a href="../RubyBreaker/Errors/UserError.html">RubyBreaker::Errors::UserError</a>
106
104
 
107
- <li><a href="../RubyBreaker/Main.html">RubyBreaker::Main</a>
108
-
109
105
  <li><a href="../RubyBreaker/ObjectPosition.html">RubyBreaker::ObjectPosition</a>
110
106
 
111
107
  <li><a href="../RubyBreaker/Position.html">RubyBreaker::Position</a>
112
108
 
109
+ <li><a href="../RubyBreaker/RDocSupport.html">RubyBreaker::RDocSupport</a>
110
+
113
111
  <li><a href="../RubyBreaker/RubyTypeUtils.html">RubyBreaker::RubyTypeUtils</a>
114
112
 
115
113
  <li><a href="../RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
@@ -130,15 +128,11 @@
130
128
 
131
129
  <li><a href="../RubyBreaker/Runtime/Pluggable.html">RubyBreaker::Runtime::Pluggable</a>
132
130
 
133
- <li><a href="../RubyBreaker/Runtime/TypePlaceholder.html">RubyBreaker::Runtime::TypePlaceholder</a>
134
-
135
131
  <li><a href="../RubyBreaker/Runtime/TypeSigParser.html">RubyBreaker::Runtime::TypeSigParser</a>
136
132
 
137
- <li><a href="../RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
138
-
139
- <li><a href="../RubyBreaker/Runtime/TypesigUnparser.html">RubyBreaker::Runtime::TypesigUnparser</a>
133
+ <li><a href="../RubyBreaker/Runtime/TypeSigUnparser.html">RubyBreaker::Runtime::TypeSigUnparser</a>
140
134
 
141
- <li><a href="../RubyBreaker/TestCase.html">RubyBreaker::TestCase</a>
135
+ <li><a href="../RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
142
136
 
143
137
  <li><a href="../RubyBreaker/TypeComparer.html">RubyBreaker::TypeComparer</a>
144
138
 
@@ -176,6 +170,18 @@
176
170
 
177
171
  <li><a href="../RubyBreaker/Util.html">RubyBreaker::Util</a>
178
172
 
173
+ <li><a href="../Test.html">Test</a>
174
+
175
+ <li><a href="../Test/Unit.html">Test::Unit</a>
176
+
177
+ <li><a href="../Test/Unit/TestCase.html">Test::Unit::TestCase</a>
178
+
179
+ <li><a href="../Rake.html">Rake</a>
180
+
181
+ <li><a href="../Rake/RubyBreakerTestTask.html">Rake::RubyBreakerTestTask</a>
182
+
183
+ <li><a href="../Kernel.html">Kernel</a>
184
+
179
185
  <li><a href="../Object.html">Object</a>
180
186
 
181
187
  </ul>
@@ -50,18 +50,17 @@
50
50
  <li>lib/rubybreaker/debug/context.rb
51
51
  <li>lib/rubybreaker/debug/debug.rb
52
52
  <li>lib/rubybreaker/debug/error.rb
53
+ <li>lib/rubybreaker/doc/rdoc.rb
53
54
  <li>lib/rubybreaker/runtime/inspector.rb
54
55
  <li>lib/rubybreaker/runtime/monitor.rb
55
56
  <li>lib/rubybreaker/runtime/object_wrapper.rb
56
57
  <li>lib/rubybreaker/runtime/overrides.rb
57
58
  <li>lib/rubybreaker/runtime/pluggable.rb
58
- <li>lib/rubybreaker/runtime/type_placeholder.rb
59
59
  <li>lib/rubybreaker/runtime/type_system.rb
60
60
  <li>lib/rubybreaker/runtime/typesig_parser.rb
61
61
  <li>lib/rubybreaker/runtime/typesig_unparser.rb
62
62
  <li>lib/rubybreaker/runtime/util.rb
63
63
  <li>lib/rubybreaker/runtime.rb
64
- <li>lib/rubybreaker/test/testcase.rb
65
64
  <li>lib/rubybreaker/type/type.rb
66
65
  <li>lib/rubybreaker/type/type_comparer.rb
67
66
  <li>lib/rubybreaker/type/type_unparser.rb
@@ -88,6 +87,10 @@
88
87
  <li><a class="include" href="RubyBreaker/TypeDefs.html">RubyBreaker::TypeDefs</a>
89
88
 
90
89
 
90
+
91
+ <li><a class="include" href="RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
92
+
93
+
91
94
  </ul>
92
95
  </nav>
93
96
 
@@ -97,12 +100,18 @@
97
100
 
98
101
  <ul class="link-list">
99
102
 
103
+ <li><a href="#method-c-breakable">::breakable</a>
104
+
105
+ <li><a href="#method-c-defined_logger-3F">::defined_logger?</a>
106
+
100
107
  <li><a href="#method-c-error">::error</a>
101
108
 
102
109
  <li><a href="#method-c-log">::log</a>
103
110
 
104
111
  <li><a href="#method-c-monitor">::monitor</a>
105
112
 
113
+ <li><a href="#method-c-run">::run</a>
114
+
106
115
  <li><a href="#method-c-verbose">::verbose</a>
107
116
 
108
117
  </ul>
@@ -123,8 +132,6 @@
123
132
 
124
133
  <li><a href="./RubyBreaker/Broken.html">RubyBreaker::Broken</a>
125
134
 
126
- <li><a href="./RubyBreaker/Broken/BrokenEigen.html">RubyBreaker::Broken::BrokenEigen</a>
127
-
128
135
  <li><a href="./RubyBreaker/Context.html">RubyBreaker::Context</a>
129
136
 
130
137
  <li><a href="./RubyBreaker/Errors.html">RubyBreaker::Errors</a>
@@ -141,12 +148,12 @@
141
148
 
142
149
  <li><a href="./RubyBreaker/Errors/UserError.html">RubyBreaker::Errors::UserError</a>
143
150
 
144
- <li><a href="./RubyBreaker/Main.html">RubyBreaker::Main</a>
145
-
146
151
  <li><a href="./RubyBreaker/ObjectPosition.html">RubyBreaker::ObjectPosition</a>
147
152
 
148
153
  <li><a href="./RubyBreaker/Position.html">RubyBreaker::Position</a>
149
154
 
155
+ <li><a href="./RubyBreaker/RDocSupport.html">RubyBreaker::RDocSupport</a>
156
+
150
157
  <li><a href="./RubyBreaker/RubyTypeUtils.html">RubyBreaker::RubyTypeUtils</a>
151
158
 
152
159
  <li><a href="./RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
@@ -167,15 +174,11 @@
167
174
 
168
175
  <li><a href="./RubyBreaker/Runtime/Pluggable.html">RubyBreaker::Runtime::Pluggable</a>
169
176
 
170
- <li><a href="./RubyBreaker/Runtime/TypePlaceholder.html">RubyBreaker::Runtime::TypePlaceholder</a>
171
-
172
177
  <li><a href="./RubyBreaker/Runtime/TypeSigParser.html">RubyBreaker::Runtime::TypeSigParser</a>
173
178
 
174
- <li><a href="./RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
175
-
176
- <li><a href="./RubyBreaker/Runtime/TypesigUnparser.html">RubyBreaker::Runtime::TypesigUnparser</a>
179
+ <li><a href="./RubyBreaker/Runtime/TypeSigUnparser.html">RubyBreaker::Runtime::TypeSigUnparser</a>
177
180
 
178
- <li><a href="./RubyBreaker/TestCase.html">RubyBreaker::TestCase</a>
181
+ <li><a href="./RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
179
182
 
180
183
  <li><a href="./RubyBreaker/TypeComparer.html">RubyBreaker::TypeComparer</a>
181
184
 
@@ -213,6 +216,18 @@
213
216
 
214
217
  <li><a href="./RubyBreaker/Util.html">RubyBreaker::Util</a>
215
218
 
219
+ <li><a href="./Test.html">Test</a>
220
+
221
+ <li><a href="./Test/Unit.html">Test::Unit</a>
222
+
223
+ <li><a href="./Test/Unit/TestCase.html">Test::Unit::TestCase</a>
224
+
225
+ <li><a href="./Rake.html">Rake</a>
226
+
227
+ <li><a href="./Rake/RubyBreakerTestTask.html">Rake::RubyBreakerTestTask</a>
228
+
229
+ <li><a href="./Kernel.html">Kernel</a>
230
+
216
231
  <li><a href="./Object.html">Object</a>
217
232
 
218
233
  </ul>
@@ -232,7 +247,7 @@
232
247
  Library.</pre>
233
248
 
234
249
  <p><a href="RubyBreaker.html">RubyBreaker</a> is a dynamic instrumentation and
235
- monitoring tool that documents type information automatically.</p>
250
+ monitoring tool that generates type documentation for Ruby programs.</p>
236
251
 
237
252
  </div><!-- description -->
238
253
 
@@ -250,36 +265,37 @@ monitoring tool that documents type information automatically.</p>
250
265
  <h3 class="section-header">Constants</h3>
251
266
  <dl>
252
267
 
253
- <dt id="BREAKABLE">BREAKABLE
268
+ <dt id="COPYRIGHT">COPYRIGHT
254
269
 
255
- <dd class="description"><p>This array lists modules/classes that will be monitored.</p>
270
+ <dd class="description"><p>This constant contains the copyright information.</p>
256
271
 
257
272
 
258
- <dt id="BROKEN">BROKEN
273
+ <dt id="IO_EXTENSION">IO_EXTENSION
259
274
 
260
- <dd class="description"><p>This array lists “broken” classes–i.e., with type signatures</p>
275
+ <dd class="description"><p>Extension used for files that contain type information in Ruby format</p>
261
276
 
262
277
 
263
- <dt id="COPYRIGHT">COPYRIGHT
278
+ <dt id="OPTIONS">OPTIONS
264
279
 
265
- <dd class="description"><p>This constant contains the copyright information.</p>
280
+ <dd class="description"><p>Options for <a href="RubyBreaker.html">RubyBreaker</a></p>
266
281
 
267
282
 
268
- <dt id="EXTENSION">EXTENSION
283
+ <dt id="OPTION_PARSER">OPTION_PARSER
269
284
 
270
- <dd class="description"><p>Extension used by <a href="RubyBreaker.html">RubyBreaker</a> for
271
- output/input</p>
285
+ <dd class="description"><p>This option parser may be used for the command-line mode or for the library
286
+ mode when used with Rakefile. See rubybreaker/task.rb for how this can be
287
+ used in the latter.</p>
272
288
 
273
289
 
274
- <dt id="INSTALLED">INSTALLED
290
+ <dt id="TASK_EXTENSION">TASK_EXTENSION
275
291
 
276
- <dd class="description"><p>This array lists modules/classes that are actually instrumented with a
277
- monitor.</p>
292
+ <dd class="description"><p>Extension used for files that contain <a
293
+ href="RubyBreaker.html">RubyBreaker</a> task information</p>
278
294
 
279
295
 
280
- <dt id="OPTIONS">OPTIONS
296
+ <dt id="YAML_EXTENSION">YAML_EXTENSION
281
297
 
282
- <dd class="description"><p>Options for <a href="RubyBreaker.html">RubyBreaker</a></p>
298
+ <dd class="description"><p>Extension used for files that contain type information in YAML format</p>
283
299
 
284
300
 
285
301
  </dl>
@@ -294,6 +310,67 @@ monitor.</p>
294
310
  <h3 class="section-header">Public Class Methods</h3>
295
311
 
296
312
 
313
+ <div id="method-c-breakable" class="method-detail ">
314
+
315
+ <div class="method-heading">
316
+ <span class="method-name">breakable</span><span
317
+ class="method-args">(*mods)</span>
318
+ <span class="method-click-advice">click to toggle source</span>
319
+ </div>
320
+
321
+
322
+ <div class="method-description">
323
+
324
+ <p>This method just redirects to Runtime’s method.</p>
325
+
326
+
327
+
328
+ <div class="method-source-code" id="breakable-source">
329
+ <pre><span class="ruby-comment"># File lib/rubybreaker/runtime.rb, line 73</span>
330
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">breakable</span>(*<span class="ruby-identifier">mods</span>)
331
+ <span class="ruby-constant">Runtime</span>.<span class="ruby-identifier">breakable</span>(*<span class="ruby-identifier">mods</span>)
332
+ <span class="ruby-keyword">end</span></pre>
333
+ </div><!-- breakable-source -->
334
+
335
+ </div>
336
+
337
+
338
+
339
+
340
+ </div><!-- breakable-method -->
341
+
342
+
343
+ <div id="method-c-defined_logger-3F" class="method-detail ">
344
+
345
+ <div class="method-heading">
346
+ <span class="method-name">defined_logger?</span><span
347
+ class="method-args">()</span>
348
+ <span class="method-click-advice">click to toggle source</span>
349
+ </div>
350
+
351
+
352
+ <div class="method-description">
353
+
354
+ <p>This method returns true if the logger is already created and false
355
+ otherwise.</p>
356
+
357
+
358
+
359
+ <div class="method-source-code" id="defined_logger-3F-source">
360
+ <pre><span class="ruby-comment"># File lib/rubybreaker/debug/debug.rb, line 13</span>
361
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">defined_logger?</span>()
362
+ <span class="ruby-keyword">return</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">LOGGER</span>)
363
+ <span class="ruby-keyword">end</span></pre>
364
+ </div><!-- defined_logger-3F-source -->
365
+
366
+ </div>
367
+
368
+
369
+
370
+
371
+ </div><!-- defined_logger-3F-method -->
372
+
373
+
297
374
  <div id="method-c-error" class="method-detail ">
298
375
 
299
376
  <div class="method-heading">
@@ -311,7 +388,7 @@ the error message but also log it.</p>
311
388
 
312
389
 
313
390
  <div class="method-source-code" id="error-source">
314
- <pre><span class="ruby-comment"># File lib/rubybreaker/debug/debug.rb, line 38</span>
391
+ <pre><span class="ruby-comment"># File lib/rubybreaker/debug/debug.rb, line 44</span>
315
392
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">error</span>(<span class="ruby-identifier">err</span>, <span class="ruby-identifier">level</span>=<span class="ruby-value">:error</span>, &amp;<span class="ruby-identifier">blk</span>)
316
393
  <span class="ruby-identifier">msg</span> = <span class="ruby-identifier">err</span>.<span class="ruby-identifier">to_s</span>
317
394
  <span class="ruby-identifier">msg</span> = <span class="ruby-node">&quot;#{msg} : #{yield}&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">blk</span>
@@ -345,7 +422,7 @@ context.</p>
345
422
 
346
423
 
347
424
  <div class="method-source-code" id="log-source">
348
- <pre><span class="ruby-comment"># File lib/rubybreaker/debug/debug.rb, line 47</span>
425
+ <pre><span class="ruby-comment"># File lib/rubybreaker/debug/debug.rb, line 53</span>
349
426
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">level</span>=<span class="ruby-value">:debug</span>, <span class="ruby-identifier">context</span>=<span class="ruby-keyword">nil</span>, &amp;<span class="ruby-identifier">blk</span>)
350
427
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">OPTIONS</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">OPTIONS</span>[<span class="ruby-value">:debug</span>]
351
428
  <span class="ruby-identifier">msg</span> = <span class="ruby-identifier">str</span>.<span class="ruby-identifier">to_s</span>
@@ -380,15 +457,15 @@ context.</p>
380
457
 
381
458
  <div class="method-description">
382
459
 
383
- <p>This is the manual indicator for the program entry point. It simply
384
- redirects to the monitor setup code.</p>
460
+ <p><strong>DEPRECATED</strong>: Use +<a
461
+ href="RubyBreaker.html#method-c-run">::run</a>+ to indicate the point of
462
+ entry.</p>
385
463
 
386
464
 
387
465
 
388
466
  <div class="method-source-code" id="monitor-source">
389
- <pre><span class="ruby-comment"># File lib/rubybreaker.rb, line 161</span>
467
+ <pre><span class="ruby-comment"># File lib/rubybreaker/runtime.rb, line 69</span>
390
468
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">monitor</span>()
391
- <span class="ruby-constant">Main</span>.<span class="ruby-identifier">setup</span>()
392
469
  <span class="ruby-keyword">end</span></pre>
393
470
  </div><!-- monitor-source -->
394
471
 
@@ -400,6 +477,62 @@ redirects to the monitor setup code.</p>
400
477
  </div><!-- monitor-method -->
401
478
 
402
479
 
480
+ <div id="method-c-run" class="method-detail ">
481
+
482
+ <div class="method-heading">
483
+ <span class="method-name">run</span><span
484
+ class="method-args">(*mods)</span>
485
+ <span class="method-click-advice">click to toggle source</span>
486
+ </div>
487
+
488
+
489
+ <div class="method-description">
490
+
491
+ <p>This method runs <a href="RubyBreaker.html">RubyBreaker</a> for a
492
+ particular test case (class). This is a bit different from running <a
493
+ href="RubyBreaker.html">RubyBreaker</a> as a shell program.</p>
494
+
495
+
496
+
497
+ <div class="method-source-code" id="run-source">
498
+ <pre><span class="ruby-comment"># File lib/rubybreaker.rb, line 151</span>
499
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">run</span>(*<span class="ruby-identifier">mods</span>)
500
+ <span class="ruby-constant">RubyBreaker</span>.<span class="ruby-identifier">setup_logger</span>() <span class="ruby-keyword">unless</span> <span class="ruby-constant">RubyBreaker</span>.<span class="ruby-identifier">defined_logger?</span>()
501
+
502
+ <span class="ruby-comment"># Task based run should use the rubybreaker options same as in shell</span>
503
+ <span class="ruby-comment"># mode. So, parse the options first.</span>
504
+ <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">running_as_task?</span>() <span class="ruby-comment"># running in task mode</span>
505
+ <span class="ruby-constant">RubyBreaker</span>.<span class="ruby-identifier">verbose</span>(<span class="ruby-string">&quot;Running RubyBreaker within a testcase&quot;</span>)
506
+ <span class="ruby-identifier">task</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">task</span>
507
+ <span class="ruby-constant">OPTION_PARSER</span>.<span class="ruby-identifier">parse</span>(*<span class="ruby-identifier">task</span>[<span class="ruby-value">:rubybreaker_opts</span>])
508
+ <span class="ruby-constant">Runtime</span>.<span class="ruby-identifier">breakable</span>(*<span class="ruby-identifier">task</span>[<span class="ruby-value">:breakable</span>])
509
+ <span class="ruby-identifier">task_name</span> = <span class="ruby-identifier">task</span>[<span class="ruby-value">:name</span>]
510
+ <span class="ruby-constant">RubyBreaker</span>.<span class="ruby-identifier">verbose</span>(<span class="ruby-string">&quot;Done reading task information&quot;</span>)
511
+ <span class="ruby-identifier">io_file</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">io_file</span>(<span class="ruby-identifier">task_name</span>)
512
+ <span class="ruby-keyword">elsif</span> <span class="ruby-constant">OPTIONS</span>[<span class="ruby-value">:prog_file</span>] <span class="ruby-comment"># running in shell mode </span>
513
+ <span class="ruby-constant">Runtime</span>.<span class="ruby-identifier">breakable</span>(*<span class="ruby-identifier">mods</span>)
514
+ <span class="ruby-identifier">io_file</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">io_file</span>(<span class="ruby-constant">OPTIONS</span>[<span class="ruby-value">:prog_file</span>])
515
+ <span class="ruby-keyword">else</span>
516
+ <span class="ruby-comment"># Otherwise, assume there are no explicit IO files.</span>
517
+ <span class="ruby-keyword">end</span>
518
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">load_input</span>(<span class="ruby-identifier">io_file</span>)
519
+
520
+ <span class="ruby-comment"># The following is deprecated but doing this for backward compatibility</span>
521
+ <span class="ruby-constant">Runtime</span>.<span class="ruby-identifier">instrument</span>()
522
+
523
+ <span class="ruby-comment"># At the end, we WILL generate an output of the type information.</span>
524
+ <span class="ruby-identifier">at_exit</span> { <span class="ruby-keyword">self</span>.<span class="ruby-identifier">output</span>(<span class="ruby-identifier">io_file</span>) }
525
+ <span class="ruby-keyword">end</span></pre>
526
+ </div><!-- run-source -->
527
+
528
+ </div>
529
+
530
+
531
+
532
+
533
+ </div><!-- run-method -->
534
+
535
+
403
536
  <div id="method-c-verbose" class="method-detail ">
404
537
 
405
538
  <div class="method-heading">
@@ -417,7 +550,7 @@ inform users of each stage in the analysis.</p>
417
550
 
418
551
 
419
552
  <div class="method-source-code" id="verbose-source">
420
- <pre><span class="ruby-comment"># File lib/rubybreaker/debug/debug.rb, line 24</span>
553
+ <pre><span class="ruby-comment"># File lib/rubybreaker/debug/debug.rb, line 30</span>
421
554
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">verbose</span>(<span class="ruby-identifier">str</span>, &amp;<span class="ruby-identifier">blk</span>)
422
555
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">OPTIONS</span>) <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-constant">OPTIONS</span>[<span class="ruby-value">:verbose</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">OPTIONS</span>[<span class="ruby-value">:debug</span>])
423
556
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">blk</span>