Sha256: 585f781e17f7db64723a257333cc9f5732f9a8658e229e854659b7df567f54ad
Contents?: true
Size: 879 Bytes
Versions: 22
Compression:
Stored size: 879 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') 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
22 entries across 22 versions & 1 rubygems