Class: EasyInstaller::Config::Validator

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

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Validator

Returns a new instance of Validator.



4
5
6
# File 'lib/easy_installer/config_validator.rb', line 4

def initialize (config)
	@config = config
end

Instance Method Details

#checkObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/easy_installer/config_validator.rb', line 8

def check
  begin
			self.validate_config_keys
      self.validate_validator_code
      self.validate_install_code
      true
    rescue Exception => e
      @error_message = e.message 
      @error_backtrace = e.backtrace
      false
    end
end

#error_backtraceObject



26
27
28
# File 'lib/easy_installer/config_validator.rb', line 26

def error_backtrace
 @error_backtrace
end

#error_messageObject

Return error returned by validating function



22
23
24
# File 'lib/easy_installer/config_validator.rb', line 22

def error_message
 @error_message
end