Module: RubyDocTest
- Defined in:
- lib/test.rb,
lib/lines.rb,
lib/result.rb,
lib/runner.rb,
lib/statement.rb,
lib/code_block.rb,
lib/rubydoctest.rb,
lib/special_directive.rb
Defined Under Namespace
Classes: CodeBlock, EvaluationError, Lines, Result, Runner, SpecialDirective, Statement, Test
Class Attribute Summary collapse
-
.ignore_interactive ⇒ Object
Returns the value of attribute ignore_interactive.
- .output_format ⇒ Object
-
.tests ⇒ Object
Returns the value of attribute tests.
-
.trace ⇒ Object
Returns the value of attribute trace.
Class Method Summary collapse
Class Attribute Details
.ignore_interactive ⇒ Object
Returns the value of attribute ignore_interactive.
10 11 12 |
# File 'lib/rubydoctest.rb', line 10 def ignore_interactive @ignore_interactive end |
.output_format ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/rubydoctest.rb', line 13 def output_format if @output_format == :ansi or (@output_format.nil? and STDOUT.tty?) :ansi elsif @output_format == :html :html else :plain end end |
.tests ⇒ Object
Returns the value of attribute tests.
10 11 12 |
# File 'lib/rubydoctest.rb', line 10 def tests @tests end |
.trace ⇒ Object
Returns the value of attribute trace.
10 11 12 |
# File 'lib/rubydoctest.rb', line 10 def trace @trace end |
Class Method Details
.indent(s, level = 4) ⇒ Object
23 24 25 26 |
# File 'lib/rubydoctest.rb', line 23 def indent(s, level=4) spaces = " " * level spaces + s.split("\n").join("\n#{spaces}") end |