Class: Cl::Ui::Base
- Inherits:
-
Struct
- Object
- Struct
- Cl::Ui::Base
- Defined in:
- lib/cl/ui.rb
Instance Attribute Summary collapse
-
#opts ⇒ Object
Returns the value of attribute opts.
- #stdout ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#opts ⇒ Object
Returns the value of attribute opts
13 14 15 |
# File 'lib/cl/ui.rb', line 13 def opts @opts end |
#stdout ⇒ Object
16 17 18 |
# File 'lib/cl/ui.rb', line 16 def stdout @stdout ||= opts[:stdout] || $stdout end |
Instance Method Details
#abort(error, *strs) ⇒ Object
24 25 26 27 |
# File 'lib/cl/ui.rb', line 24 def abort(error, *strs) self.error [error., *strs].join("\n\n") exit 1 end |
#puts(*strs) ⇒ Object
20 21 22 |
# File 'lib/cl/ui.rb', line 20 def puts(*strs) stdout.puts(*strs) end |