module Travis::Conditions::V1::Boolean
Constants
- AND
- BOP
- NOT
- OR
Public Instance Methods
expr()
click to toggle source
# File lib/travis/conditions/v1/boolean.rb, line 39 def expr lft = expr_ lft = [:or, lft, expr_] while op(OR) lft end
expr_()
click to toggle source
# File lib/travis/conditions/v1/boolean.rb, line 45 def expr_ lft = oprd lft = [:and, lft, oprd] while op(AND) lft end
not_() { |and return [:not, t]| ... }
click to toggle source
# File lib/travis/conditions/v1/boolean.rb, line 57 def not_ pos = self.pos space { scan(NOT) } or return t = yield and return [:not, t] str.pos = pos nil end
op(op)
click to toggle source
# File lib/travis/conditions/v1/boolean.rb, line 65 def op(op) op = space { scan(op) } and BOP[op.downcase] end
oprd()
click to toggle source
# File lib/travis/conditions/v1/boolean.rb, line 51 def oprd t = parens { expr } and return t t = not_ { oprd } and return t term end