Class: VagrantPlugins::DevCommands::Registry::Messager
- Inherits:
-
Object
- Object
- VagrantPlugins::DevCommands::Registry::Messager
- Defined in:
- lib/vagrant/devcommands/registry/messager.rb
Overview
Generic registry message printer
Constant Summary collapse
- I18N_KEY =
'vagrant_devcommands.registry'
Instance Method Summary collapse
- #chain_ignored(message, name) ⇒ Object
- #command_alias_ignored(message, name) ⇒ Object
- #def_duplicate(args) ⇒ Object
- #def_ignored(message, args) ⇒ Object
-
#initialize(env) ⇒ Messager
constructor
A new instance of Messager.
- #unknown_options(args) ⇒ Object
Constructor Details
#initialize(env) ⇒ Messager
Returns a new instance of Messager.
10 11 12 |
# File 'lib/vagrant/devcommands/registry/messager.rb', line 10 def initialize(env) @env = env end |
Instance Method Details
#chain_ignored(message, name) ⇒ Object
14 15 16 17 |
# File 'lib/vagrant/devcommands/registry/messager.rb', line 14 def chain_ignored(, name) @env.ui.warn I18n.t("#{I18N_KEY}.#{}", name: name) @env.ui.warn I18n.t("#{I18N_KEY}.chain_ignored") end |
#command_alias_ignored(message, name) ⇒ Object
19 20 21 22 |
# File 'lib/vagrant/devcommands/registry/messager.rb', line 19 def command_alias_ignored(, name) @env.ui.warn I18n.t("#{I18N_KEY}.#{}", name: name) @env.ui.warn I18n.t("#{I18N_KEY}.command_alias_ignored") end |
#def_duplicate(args) ⇒ Object
24 25 26 27 |
# File 'lib/vagrant/devcommands/registry/messager.rb', line 24 def def_duplicate(args) @env.ui.warn I18n.t("#{I18N_KEY}.def_duplicate", **args) @env.ui.warn '' end |
#def_ignored(message, args) ⇒ Object
29 30 31 32 33 |
# File 'lib/vagrant/devcommands/registry/messager.rb', line 29 def def_ignored(, args) @env.ui.warn I18n.t("#{I18N_KEY}.#{}", **args) @env.ui.warn I18n.t("#{I18N_KEY}.def_ignored") @env.ui.warn '' end |
#unknown_options(args) ⇒ Object
35 36 37 38 |
# File 'lib/vagrant/devcommands/registry/messager.rb', line 35 def (args) @env.ui.warn I18n.t("#{I18N_KEY}.unknown_options", **args) @env.ui.warn '' end |