Class: Mentor::Main

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

Instance Method Summary collapse

Constructor Details

#initializeMain

Returns a new instance of Main.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/main.rb', line 5

def initialize

  error_class = MentorError.find

  return unless error_class

  begin
    error = error_class.new
    raise error
  rescue *MentorError.error_classes
    error.output
    exit 1
  end

end