Module: I18n::Tasks::Command::Commands::Meta

Includes:
I18n::Tasks::Command::Collection
Included in:
I18n::Tasks::Commands
Defined in:
lib/i18n/tasks/command/commands/meta.rb

Instance Method Summary collapse

Methods included from I18n::Tasks::Command::Collection

included

Instance Method Details

#config(opts = {}) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/i18n/tasks/command/commands/meta.rb', line 13

def config(opts = {})
  cfg = i18n.config_for_inspect
  cfg = cfg.slice(*opts[:arguments]) if opts[:arguments].present?
  cfg = cfg.to_yaml
  cfg.sub!(/\A---\n/, '')
  cfg.gsub!(/^([^\s-].+?:)/, Rainbow('\1').cyan.bright)
  puts cfg
end

#gem_pathObject



24
25
26
# File 'lib/i18n/tasks/command/commands/meta.rb', line 24

def gem_path
  puts I18n::Tasks.gem_path
end

#irbObject



30
31
32
33
# File 'lib/i18n/tasks/command/commands/meta.rb', line 30

def irb
  require 'i18n/tasks/console_context'
  ::I18n::Tasks::ConsoleContext.start
end