Class: I18nDefScanner::CliArguments
- Inherits:
-
Object
- Object
- I18nDefScanner::CliArguments
- Defined in:
- lib/i18n_def_scanner/cli_arguments.rb
Constant Summary collapse
- NAMED_ARGS_RE =
/--?([^=\s]+)(?:=(\S+))?/.freeze
Instance Attribute Summary collapse
-
#argv_array ⇒ Object
Returns the value of attribute argv_array.
Instance Method Summary collapse
- #help? ⇒ Boolean
-
#initialize(argv_array) ⇒ CliArguments
constructor
A new instance of CliArguments.
- #to_hash ⇒ Object
Constructor Details
#initialize(argv_array) ⇒ CliArguments
Returns a new instance of CliArguments.
9 10 11 |
# File 'lib/i18n_def_scanner/cli_arguments.rb', line 9 def initialize(argv_array) self.argv_array = argv_array end |
Instance Attribute Details
#argv_array ⇒ Object
Returns the value of attribute argv_array.
7 8 9 |
# File 'lib/i18n_def_scanner/cli_arguments.rb', line 7 def argv_array @argv_array end |
Instance Method Details
#help? ⇒ Boolean
17 18 19 |
# File 'lib/i18n_def_scanner/cli_arguments.rb', line 17 def help? named_args.key?('help') || query_path.nil? end |
#to_hash ⇒ Object
13 14 15 |
# File 'lib/i18n_def_scanner/cli_arguments.rb', line 13 def to_hash { query_path: query_path, load_path: load_path }.compact end |