Sha256: 16a40837796ae4771ce2db202dad33a9be733bd353d69db0326d48b910221bb3

Contents?: true

Size: 799 Bytes

Versions: 14

Compression:

Stored size: 799 Bytes

Contents

module Hem
  module Lib
    module HostCheck
      class << self
        include Hem::Lib::HostCheck
        def check opts = {}
          opts = {
            :filter => nil,
            :raise => false
          }.merge(opts)

          results = {}
          methods = Hem::Lib::HostCheck.public_instance_methods(false)
          methods.each do |method|
            next if opts[:filter] && !method.match(opts[:filter])

            if opts[:raise]
              self.send method, opts
            else
              begin
                self.send method, opts
                results[method] = :ok
              rescue Hem::Error => error
                results[method] = error
              end
            end
          end

          return results
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
hem-1.2.4 lib/hem/lib/host_check.rb
hem-1.2.3 lib/hem/lib/host_check.rb
hem-1.2.2 lib/hem/lib/host_check.rb
hem-1.2.1 lib/hem/lib/host_check.rb
hem-1.2.0 lib/hem/lib/host_check.rb
hem-1.1.2 lib/hem/lib/host_check.rb
hem-1.1.1 lib/hem/lib/host_check.rb
hem-1.1.0 lib/hem/lib/host_check.rb
hem-1.0.1.beta6 lib/hem/lib/host_check.rb
hem-1.0.1.beta5 lib/hem/lib/host_check.rb
hem-1.0.1.beta4 lib/hem/lib/host_check.rb
hem-1.0.1.beta3 lib/hem/lib/host_check.rb
hem-1.0.1.beta2 lib/hem/lib/host_check.rb
hem-1.0.1.beta1 lib/hem/lib/host_check.rb