Module: CARPS::Protocol
- Defined in:
- lib/carps/protocol/keyword.rb
Class Method Summary collapse
-
.check(result, expected) ⇒ Object
Check that the first argument is not nil, if so, raise an ‘expected’ parse error, using the second argument.
Class Method Details
.check(result, expected) ⇒ Object
Check that the first argument is not nil, if so, raise an ‘expected’ parse error, using the second argument
78 79 80 81 82 |
# File 'lib/carps/protocol/keyword.rb', line 78 def Protocol.check result, expected if result == nil raise Expected, expected end end |