lib/configliere/define.rb
# Check that all required params are present.
Check that all required params are present.
Check that all required params are present .
def validate_requireds!
      missing = []
      params_with(:required).each do |param, is_required|
        missing << param if self[param].nil? && is_required
      end
      return if missing.empty?
      raise "Missing values for: #{missing.map{|pn| d = definition_of(pn, :description) ; (d ? "#{pn} (#{d})" : pn.to_s) }.sort.join(", ")}"
    end
def validate_requireds! missing = [ ] params_with ( :required ) . each do | param , is_required | missing << param if self [ param ] . nil? && is_required end return if missing . empty? raise "Missing values for: #{missing.map{|pn| d = definition_of(pn, :description) ; (d ? "#{pn} (#{d})" : pn.to_s) }.sort.join(", ")}" end
Check that all required params are present.
Check that all required params are present .