Module: MotherBrain::Cli::Shell::Ext::ClassMethods

Defined in:
lib/mb/cli/shell/ext.rb

Instance Method Summary collapse

Instance Method Details

#deprecated(message) ⇒ Object



34
35
36
# File 'lib/mb/cli/shell/ext.rb', line 34

def deprecated(message)
  warn("[DEPRECATION] #{message}")
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(message = "", color = nil, force_new_line = nil)
  return if quiet?

  super(message, 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(message)
  say(message, :yellow)
end