Method: Code::Object::Boolean#call
- Defined in:
- lib/code/object/boolean.rb
#call(**args) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/code/object/boolean.rb', line 12 def call(**args) operator = args.fetch(:operator, nil) arguments = args.fetch(:arguments, List.new) value = arguments.code_first case operator.to_s when "&", "bitwise_and" sig(args) { Boolean } code_bitwise_and(value) when "^", "bitwise_xor" sig(args) { Boolean } code_bitwise_xor(value) when "|", "bitwise_or" sig(args) { Boolean } code_bitwise_or(value) else super end end |