class I18n::Processes::Command::Commander
Attributes
i18n[R]
Public Class Methods
new(i18n)
click to toggle source
@param [I18n::Processes::BaseTask] i18n
# File lib/i18n/processes/command/commander.rb, line 15 def initialize(i18n) @i18n = i18n end
Public Instance Methods
run(name, opts = {})
click to toggle source
# File lib/i18n/processes/command/commander.rb, line 19 def run(name, opts = {}) name = name.to_sym public_name = name.to_s.tr '_', '-' log_verbose "task: #{public_name}(#{opts.map { |k, v| "#{k}: #{v.inspect}" } * ', '})" if opts.empty? || method(name).arity.zero? send name else send name, opts end end
Protected Instance Methods
spreadsheet_report()
click to toggle source
# File lib/i18n/processes/command/commander.rb, line 36 def spreadsheet_report @spreadsheet_report ||= I18n::Processes::Reports::Spreadsheet.new(i18n) end
terminal_report()
click to toggle source
# File lib/i18n/processes/command/commander.rb, line 32 def terminal_report @terminal_report ||= I18n::Processes::Reports::Terminal.new(i18n) end