class I18nDefScanner::CliArguments
Constants
- NAMED_ARGS_RE
Attributes
argv_array[RW]
Public Class Methods
new(argv_array)
click to toggle source
# File lib/i18n_def_scanner/cli_arguments.rb, line 9 def initialize(argv_array) self.argv_array = argv_array end
Public Instance Methods
help?()
click to toggle source
# File lib/i18n_def_scanner/cli_arguments.rb, line 17 def help? named_args.key?('help') || query_path.nil? end
to_hash()
click to toggle source
# File lib/i18n_def_scanner/cli_arguments.rb, line 13 def to_hash { query_path: query_path, load_path: load_path }.compact end
Private Instance Methods
load_path()
click to toggle source
# File lib/i18n_def_scanner/cli_arguments.rb, line 27 def load_path named_args['path'] end
named_args()
click to toggle source
# File lib/i18n_def_scanner/cli_arguments.rb, line 31 def named_args @named_args ||= Hash[argv_array.join(' ').scan(NAMED_ARGS_RE)] end
query_path()
click to toggle source
# File lib/i18n_def_scanner/cli_arguments.rb, line 23 def query_path argv_array[0] end