Class: Sus::Output::Null
- Inherits:
-
Object
- Object
- Sus::Output::Null
- Includes:
- Messages
- Defined in:
- lib/sus/output/null.rb
Overview
Represents a null output handler that discards all output.
Direct Known Subclasses
Constant Summary
Constants included from Messages
Messages::FAILED_PREFIX, Messages::PASSED_PREFIX
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#append(buffer) ⇒ Object
Append chunks from a buffer (no-op).
-
#buffered ⇒ Object
Create a buffered output handler.
-
#indent ⇒ Object
Increase indentation (no-op).
-
#indented ⇒ Object
Execute a block with indentation (no-op, just yields).
-
#initialize ⇒ Null
constructor
Initialize a new Null output handler.
- #Optional options (unused).=(options(unused)(value)) ⇒ Object
-
#outdent ⇒ Object
Decrease indentation (no-op).
-
#puts(*arguments) ⇒ Object
Write output followed by a newline (no-op).
-
#write(*arguments) ⇒ Object
Write output (no-op).
Methods included from Messages
#assert, #error, #error_prefix, #fail_prefix, #inform, #inform_prefix, #pass_prefix, #skip, #skip_prefix
Constructor Details
#initialize ⇒ Null
Initialize a new Null output handler.
15 16 |
# File 'lib/sus/output/null.rb', line 15 def initialize end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
25 26 27 |
# File 'lib/sus/output/null.rb', line 25 def @options end |
Instance Method Details
#append(buffer) ⇒ Object
Append chunks from a buffer (no-op).
29 30 |
# File 'lib/sus/output/null.rb', line 29 def append(buffer) end |
#buffered ⇒ Object
Create a buffered output handler.
20 21 22 |
# File 'lib/sus/output/null.rb', line 20 def buffered Buffered.new(nil) end |
#indent ⇒ Object
Increase indentation (no-op).
33 34 |
# File 'lib/sus/output/null.rb', line 33 def indent end |
#indented ⇒ Object
Execute a block with indentation (no-op, just yields).
42 43 44 |
# File 'lib/sus/output/null.rb', line 42 def indented yield end |
#Optional options (unused).=(options(unused)(value)) ⇒ Object
25 |
# File 'lib/sus/output/null.rb', line 25 attr :options |
#outdent ⇒ Object
Decrease indentation (no-op).
37 38 |
# File 'lib/sus/output/null.rb', line 37 def outdent end |
#puts(*arguments) ⇒ Object
Write output followed by a newline (no-op).
54 55 56 |
# File 'lib/sus/output/null.rb', line 54 def puts(*arguments) # Do nothing. end |
#write(*arguments) ⇒ Object
Write output (no-op).
48 49 50 |
# File 'lib/sus/output/null.rb', line 48 def write(*arguments) # Do nothing. end |