Module: DBum::Helpers
Overview
Mixins for DBum’s Thor subclasses.
Instance Method Summary collapse
-
#actions ⇒ Object
Shortcut for Thor::Actions.
-
#old_puts ⇒ Object
Save the canonical implementation of “puts”.
-
#puts(*args) ⇒ Object
Monkeypatch puts to support Thor::Shell::Color.
-
#util ⇒ Object
Shortcut for Thor::Util.
Instance Method Details
#actions ⇒ Object
Shortcut for Thor::Actions.
25 |
# File 'lib/dbum/helpers.rb', line 25 def actions ; Thor::Actions end |
#old_puts ⇒ Object
Save the canonical implementation of “puts”
11 |
# File 'lib/dbum/helpers.rb', line 11 alias_method :old_puts, :puts |
#puts(*args) ⇒ Object
Monkeypatch puts to support Thor::Shell::Color.
14 15 16 17 |
# File 'lib/dbum/helpers.rb', line 14 def puts *args return old_puts if args.empty? old_puts shell.set_color(*args) end |
#util ⇒ Object
Shortcut for Thor::Util.
21 |
# File 'lib/dbum/helpers.rb', line 21 def util ; Thor::Util end |