Class: EasyCreds::Doctor

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_creds/doctor.rb

Instance Method Summary collapse

Constructor Details

#initialize(root: nil, verbose: false) ⇒ Doctor

Returns a new instance of Doctor.



5
6
7
8
9
# File 'lib/easy_creds/doctor.rb', line 5

def initialize(root: nil, verbose: false)
  @root    = root ? Pathname.new(root) : detect_root
  @verbose = verbose
  @checks  = []
end

Instance Method Details

#runObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/easy_creds/doctor.rb', line 11

def run
  check_op_installed
  check_op_signed_in
  check_vault
  check_project
  check_gitignore

  print_summary
  @checks.all? { |c| c[:ok] }
end