Class: Abak::Flow::Commands::Checkup

Inherits:
Object
  • Object
show all
Includes:
ANSI::Code
Defined in:
lib/abak-flow/commands/checkup.rb

Instance Method Summary collapse

Instance Method Details

#process(args, options) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/abak-flow/commands/checkup.rb', line 13

def process(args, options)
  inspector = Inspector.new(call_method: :valid?, collect_attribute: :errors)
  inspector.examine(Manager.configuration, Manager.repository).on_fail do |insp|
    say red { Manager.locale.error(self) }
    say yellow { insp.output }

    exit 100
  end
end

#run(args, options) ⇒ Object



7
8
9
10
11
# File 'lib/abak-flow/commands/checkup.rb', line 7

def run(args, options)
  process(args, options)

  say green { Manager.locale.success(self) }
end