Class: LogixToolkit::Operations::And

Inherits:
Object
  • Object
show all
Defined in:
lib/logix-toolkit/operations/and.rb

Overview

The “and” class used to define and operations (e.g A ∧ B)

Class Method Summary collapse

Class Method Details

.check3?(arg0, arg1, arg2) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
22
23
24
25
26
27
28
29
# File 'lib/logix-toolkit/operations/and.rb', line 19

def self.check3? arg0, arg1, arg2
  if BooleanVerifier.verify? arg0, arg1, arg2
    if arg0 and arg1 and arg2
      return true
    else
      return false
    end
  else
    ErrorsAndExceptions.couldnt_be_performed
  end
end

.check4?(arg0, arg1, arg2, arg3) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
34
35
36
37
38
39
40
41
# File 'lib/logix-toolkit/operations/and.rb', line 31

def self.check4? arg0, arg1, arg2, arg3
  if BooleanVerifier.verify? arg0, arg1, arg2, arg3
    if arg0 and arg1 and arg2 and arg3
      return true
    else
      return false
    end
  else
    ErrorsAndExceptions.couldnt_be_performed
  end
end

.check5?(arg0, arg1, arg2, arg3, arg4) ⇒ Boolean

Returns:

  • (Boolean)


43
44
45
46
47
48
49
50
51
52
53
# File 'lib/logix-toolkit/operations/and.rb', line 43

def self.check5? arg0, arg1, arg2, arg3, arg4
  if BooleanVerifier.verify? arg0, arg1, arg2, arg3, arg4
    if arg0 and arg1 and arg2 and arg3 and arg4
      return true
    else
      return false
    end
  else
    ErrorsAndExceptions.couldnt_be_performed
  end
end

.check?(arg0, arg1) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
11
12
13
14
15
16
17
# File 'lib/logix-toolkit/operations/and.rb', line 7

def self.check? arg0, arg1
  if BooleanVerifier.verify? arg0, arg1
    if arg0 and arg1
      return true
    else
      return false
    end
  else
    ErrorsAndExceptions.couldnt_be_performed
  end
end