Module: MotherBrain::Cli::Shell::Ext::ClassMethods
- Defined in:
- lib/mb/cli/shell/ext.rb
Instance Method Summary collapse
- #deprecated(message) ⇒ Object
-
#mute! ⇒ Object
Mute the output of this instance of UI until #unmute! is called.
- #say(message = "", color = nil, force_new_line = nil) ⇒ Object (also: #info)
-
#unmute! ⇒ Object
Unmute the output of this instance of UI until #mute! is called.
- #warn(message) ⇒ Object
Instance Method Details
#deprecated(message) ⇒ Object
34 35 36 |
# File 'lib/mb/cli/shell/ext.rb', line 34 def deprecated() warn("[DEPRECATION] #{}") end |
#mute! ⇒ Object
Mute the output of this instance of UI until #unmute! is called
14 15 16 |
# File 'lib/mb/cli/shell/ext.rb', line 14 def mute! @mute = true end |
#say(message = "", color = nil, force_new_line = nil) ⇒ Object Also known as: info
23 24 25 26 27 |
# File 'lib/mb/cli/shell/ext.rb', line 23 def say( = "", color = nil, force_new_line = nil) return if quiet? super(, color) end |
#unmute! ⇒ Object
Unmute the output of this instance of UI until #mute! is called
19 20 21 |
# File 'lib/mb/cli/shell/ext.rb', line 19 def unmute! @mute = false end |
#warn(message) ⇒ Object
30 31 32 |
# File 'lib/mb/cli/shell/ext.rb', line 30 def warn() say(, :yellow) end |