Sha256: 88e062d9eba04c74d12b276de87d4cfc1350469fda3dacf6dd43a7b9a1443a53
Contents?: true
Size: 998 Bytes
Versions: 14
Compression:
Stored size: 998 Bytes
Contents
# frozen_string_literal: true require 'i18n/tasks/command/dsl' module I18n::Tasks module Command module Options module Common include Command::DSL arg :nostdin, '-S', '--nostdin', t('i18n_tasks.cmd.args.desc.nostdin') arg :confirm, '-y', '--confirm', desc: t('i18n_tasks.cmd.args.desc.confirm') arg :pattern, '-p', '--pattern PATTERN', t('i18n_tasks.cmd.args.desc.key_pattern') arg :value, '-v', '--value VALUE', t('i18n_tasks.cmd.args.desc.value') arg :config, '-c', '--config FILE', t('i18n_tasks.cmd.args.desc.config') def arg_or_pos!(key, opts) opts[key] ||= opts[:arguments].try(:shift) end def pos_or_stdin!(opts) opts[:arguments].try(:shift) || $stdin.read end end end end end
Version data entries
14 entries across 14 versions & 2 rubygems