Class: VagrantPlugins::DevCommands::Messages

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/devcommands/messages.rb

Overview

Provides access to messages used by the plugin

Constant Summary collapse

I18N_KEY =
'vagrant_devcommands.message'.freeze

Class Method Summary collapse

Class Method Details

.chain_no_help(&out) ⇒ Object



9
10
11
# File 'lib/vagrant/devcommands/messages.rb', line 9

def self.chain_no_help(&out)
  out.call I18n.t("#{I18N_KEY}.chain_no_help")
end

.command_alias_no_help(&out) ⇒ Object



13
14
15
# File 'lib/vagrant/devcommands/messages.rb', line 13

def self.command_alias_no_help(&out)
  out.call I18n.t("#{I18N_KEY}.command_alias_no_help")
end

.command_no_help(&out) ⇒ Object



17
18
19
# File 'lib/vagrant/devcommands/messages.rb', line 17

def self.command_no_help(&out)
  out.call I18n.t("#{I18N_KEY}.command_no_help")
end

.deprecated_box_config(&out) ⇒ Object



21
22
23
24
# File 'lib/vagrant/devcommands/messages.rb', line 21

def self.deprecated_box_config(&out)
  out.call I18n.t("#{I18N_KEY}.deprecated_box_config")
  out.call ''
end

.missing_commandfile(&out) ⇒ Object



26
27
28
# File 'lib/vagrant/devcommands/messages.rb', line 26

def self.missing_commandfile(&out)
  out.call I18n.t("#{I18N_KEY}.missing_commandfile")
end

.no_commands(&out) ⇒ Object



30
31
32
# File 'lib/vagrant/devcommands/messages.rb', line 30

def self.no_commands(&out)
  out.call I18n.t("#{I18N_KEY}.no_commands")
end

.plugin_readme(&out) ⇒ Object



34
35
36
37
38
39
# File 'lib/vagrant/devcommands/messages.rb', line 34

def self.plugin_readme(&out)
  curdir = File.expand_path(__dir__)
  readme = File.expand_path(File.join(curdir, '../../../README.md'))

  out.call I18n.t("#{I18N_KEY}.plugin_readme", readme: readme)
end

.plugin_usage(&out) ⇒ Object



41
42
43
# File 'lib/vagrant/devcommands/messages.rb', line 41

def self.plugin_usage(&out)
  out.call I18n.t("#{I18N_KEY}.plugin_usage")
end

.pre_ln(msg, &out) ⇒ Object



45
46
47
48
49
# File 'lib/vagrant/devcommands/messages.rb', line 45

def self.pre_ln(msg, &out)
  out.call ''

  public_send(msg, &out)
end