Class: Orats::ARGVAdjust

Inherits:
Object
  • Object
show all
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

Methods included from UI

#error, #log, #results, #task

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.expand_path('~/.oratsrc')
  @rc_path = ''
end

Instance Method Details

#initObject



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