Class: Unfig::ArgvLoader
- Inherits:
-
Object
- Object
- Unfig::ArgvLoader
- Defined in:
- lib/unfig/argv_loader.rb
Instance Method Summary collapse
-
#initialize(params:, argv:) ⇒ ArgvLoader
constructor
A new instance of ArgvLoader.
- #read ⇒ Object
Constructor Details
#initialize(params:, argv:) ⇒ ArgvLoader
Returns a new instance of ArgvLoader.
3 4 5 6 7 8 |
# File 'lib/unfig/argv_loader.rb', line 3 def initialize(params:, argv:) @params = params @argv = argv = {} @stop_early = false end |
Instance Method Details
#read ⇒ Object
10 11 12 13 14 |
# File 'lib/unfig/argv_loader.rb', line 10 def read return @_read if defined?(@_read) option_parser.parse!(argv) @_read = @stop_early ? nil : end |