Method: EasyInstaller::Validator#add_validating_function

Defined in:
lib/easy_installer/validator.rb

#add_validating_function(input, input_ready, code) ⇒ Object

Manualy add validating function to class

Attributes

  • input - Array of String : list of input names which will be validated by function

  • input_ready - Array of String: list of input names which have to be ready to run function

  • &block - Block of code : validating code

Example

add_validating_function(,[‘path’,‘host’]) do #some code true end



58
59
60
61
# File 'lib/easy_installer/validator.rb', line 58

def add_validating_function(input, input_ready, code)
  @checking_functions = Array.new unless @checking_functions
  @checking_functions << {:input => input, :input_ready=>input_ready, :code => code }
end