Module: BOAST::TopLevelExpressions

Included in:
BOAST
Defined in:
lib/BOAST/Language/Arithmetic.rb

Instance Method Summary collapse

Instance Method Details

#And(a, b) ⇒ Expression

Creates an Expression using the boolean And Operator

Parameters:

  • a (#to_var)
  • b (#to_var)

Returns:



16
17
18
# File 'lib/BOAST/Language/Arithmetic.rb', line 16

def And(a, b)
  return Expression::new(And, a, b)
end

#Max(a, b) ⇒ Object



28
29
30
# File 'lib/BOAST/Language/Arithmetic.rb', line 28

def Max(a, b)
  return Expression::new(Max, a, b)
end

#Min(a, b) ⇒ Object



32
33
34
# File 'lib/BOAST/Language/Arithmetic.rb', line 32

def Min(a, b)
  return Expression::new(Min, a, b)
end

#Or(a, b) ⇒ Expression

Creates an Expression using the boolean Or Operator

Parameters:

  • a (#to_var)
  • b (#to_var)

Returns:



24
25
26
# File 'lib/BOAST/Language/Arithmetic.rb', line 24

def Or(a, b)
  return Expression::new(Or, a, b)
end

#Return(value) ⇒ Expression

Creates a return Expression

Parameters:

  • value (#to_var)

    to return

Returns:



8
9
10
# File 'lib/BOAST/Language/Arithmetic.rb', line 8

def Return(value)
  return Expression::new("return",nil, value ? value : "" )
end