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_no_help(&out) ⇒ Object



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

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

.deprecated_box_config(&out) ⇒ Object



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

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

.missing_commandfile(&out) ⇒ Object



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

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

.no_commands(&out) ⇒ Object



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

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

.plugin_readme(&out) ⇒ Object



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

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

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

.plugin_usage(&out) ⇒ Object



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

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

.pre_ln(msg, &out) ⇒ Object



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

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

  public_send(msg, &out)
end