Class: Orats::ARGVAdjust
- Inherits:
-
Object
- Object
- Orats::ARGVAdjust
- Includes:
- UI
- Defined in:
- lib/orats/argv_adjust.rb
Overview
adjust ARGV by adding args from the .oratsrc file if necessary
Instance Method Summary collapse
- #init ⇒ Object
-
#initialize(argv = ARGV) ⇒ ARGVAdjust
constructor
A new instance of ARGVAdjust.
Methods included from UI
Constructor Details
#initialize(argv = ARGV) ⇒ ARGVAdjust
Returns a new instance of ARGVAdjust.
8 9 10 11 12 13 |
# File 'lib/orats/argv_adjust.rb', line 8 def initialize(argv = ARGV) @argv = argv @default_rc_file = File.('~/.oratsrc') @rc_path = '' end |
Instance Method Details
#init ⇒ Object
15 16 17 18 19 20 |
# File 'lib/orats/argv_adjust.rb', line 15 def init rc_path @argv.first return @argv if @rc_path.empty? argv end |