Class: Scripted::Formatters::Blank
- Inherits:
-
Object
- Object
- Scripted::Formatters::Blank
- Defined in:
- lib/scripted/formatters/blank.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#raw_out ⇒ Object
readonly
Returns the value of attribute raw_out.
Instance Method Summary collapse
-
#close ⇒ Object
Called just before scripted exits.
-
#done(command) ⇒ Object
Called whenever a command has been run.
-
#each_char(output, command) ⇒ Object
Called for each character that went to stdout or stderr.
-
#exception(command, exception) ⇒ Object
Called whenever a command has failed.
-
#execute(command) ⇒ Object
Called just before a command starts running.
-
#halted(command) ⇒ Object
Called when an important command has failed.
-
#initialize(out, configuration) ⇒ Blank
constructor
Called whn Scripted starts.
-
#start(commands, runner) ⇒ Object
Called when the commands to be run have been selected No command has yet been run.
-
#stop(commands, runner) ⇒ Object
Called after all commands have been run.
Constructor Details
#initialize(out, configuration) ⇒ Blank
Called whn Scripted starts. If you override this, don’t forget to call ‘super`.
9 10 11 12 |
# File 'lib/scripted/formatters/blank.rb', line 9 def initialize(out, configuration) @raw_out = out || $stderr @configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
5 6 7 |
# File 'lib/scripted/formatters/blank.rb', line 5 def configuration @configuration end |
#raw_out ⇒ Object (readonly)
Returns the value of attribute raw_out.
5 6 7 |
# File 'lib/scripted/formatters/blank.rb', line 5 def raw_out @raw_out end |
Instance Method Details
#close ⇒ Object
Called just before scripted exits. Useful for closing streams and closing connections.
41 42 |
# File 'lib/scripted/formatters/blank.rb', line 41 def close end |
#done(command) ⇒ Object
Called whenever a command has been run.
28 29 |
# File 'lib/scripted/formatters/blank.rb', line 28 def done(command) end |
#each_char(output, command) ⇒ Object
Called for each character that went to stdout or stderr. Doesn’t include output of other formatters.
46 47 |
# File 'lib/scripted/formatters/blank.rb', line 46 def each_char(output, command) end |
#exception(command, exception) ⇒ Object
Called whenever a command has failed.
24 25 |
# File 'lib/scripted/formatters/blank.rb', line 24 def exception(command, exception) end |
#execute(command) ⇒ Object
Called just before a command starts running
36 37 |
# File 'lib/scripted/formatters/blank.rb', line 36 def execute(command) end |
#halted(command) ⇒ Object
Called when an important command has failed.
32 33 |
# File 'lib/scripted/formatters/blank.rb', line 32 def halted(command) end |
#start(commands, runner) ⇒ Object
Called when the commands to be run have been selected No command has yet been run
16 17 |
# File 'lib/scripted/formatters/blank.rb', line 16 def start(commands, runner) end |
#stop(commands, runner) ⇒ Object
Called after all commands have been run.
20 21 |
# File 'lib/scripted/formatters/blank.rb', line 20 def stop(commands, runner) end |