Class: Fission::UI
Instance Attribute Summary collapse
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(stdout = $stdout) ⇒ UI
constructor
A new instance of UI.
- #output(s) ⇒ Object
- #output_and_exit(s, exit_code) ⇒ Object
- #output_printf(string, key, value) ⇒ Object
Constructor Details
#initialize(stdout = $stdout) ⇒ UI
Returns a new instance of UI.
5 6 7 |
# File 'lib/fission.old/ui.rb', line 5 def initialize(stdout=$stdout) @stdout = stdout end |
Instance Attribute Details
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
3 4 5 |
# File 'lib/fission.old/ui.rb', line 3 def stdout @stdout end |
Instance Method Details
#output(s) ⇒ Object
9 10 11 |
# File 'lib/fission.old/ui.rb', line 9 def output(s) @stdout.puts s end |
#output_and_exit(s, exit_code) ⇒ Object
17 18 19 20 |
# File 'lib/fission.old/ui.rb', line 17 def output_and_exit(s, exit_code) output s exit exit_code end |
#output_printf(string, key, value) ⇒ Object
13 14 15 |
# File 'lib/fission.old/ui.rb', line 13 def output_printf(string, key, value) @stdout.send :printf, string, key, value end |