Sha256: 8efda836fee04ef9e4e179c2c4fe4f104961c67ccbbe1ba2f1334eeed4dce0f5

Contents?: true

Size: 307 Bytes

Versions: 1

Compression:

Stored size: 307 Bytes

Contents

module Guardy
  # Guard object,
  # @see .call
  class Guard
    class << self
      # @param conditionals [Boolean] list of conditionals to check
      # @yield Block to run if any conditions are false
      def call(*conditionals)
        yield if conditionals.include?(false)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
guardy-0.1.0 lib/guardy/guard.rb