Sha256: 859676cca36ae9d60c425841eed59f7afc26ddf16d9880c00d609c09b56c9243

Contents?: true

Size: 514 Bytes

Versions: 10

Compression:

Stored size: 514 Bytes

Contents

module Reflection
  module Validations
    class << self
      
      def existence_of(path)        
        if File.exist?(path)
          return true
        else
          Reflection::Support.exit_with_error "Option validation failed: #{path} does not exist."
        end
      end
      
      # def presense_of(option)
      #   if !option.nil? && !option.empty?
      #     return true
      #   else
      #     exit_with_error "Option validation failed: "
      #   end
      # end
      
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
basiszwo-reflection-0.5.1 lib/reflection/validations.rb
reflection-0.5.0 lib/reflection/validations.rb
reflection-0.4.6 lib/reflection/validations.rb
reflection-0.4.5 lib/reflection/validations.rb
reflection-0.4.4 lib/reflection/validations.rb
reflection-0.4.3 lib/reflection/validations.rb
reflection-0.4.1 lib/reflection/validations.rb
reflection-0.4.0 lib/reflection/validations.rb
reflection-0.3.1 lib/reflection/validations.rb
reflection-0.0.2 lib/reflection/validations.rb