Module: Java
- Defined in:
- lib/java.rb,
lib/java/version.rb
Constant Summary collapse
- BYTE =
-1<<7...1<<7
- SHORT =
-1<<15...1<<15
- INT =
-1<<31...1<<31
- LONG =
-1<<63...1<<63
- VERSION =
"0.0.2"
Class Method Summary collapse
Class Method Details
.assert_return_type(meth, type, type_klass = NilClass, rtn, &condition) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/java.rb', line 9 def self.assert_return_type(meth, type, type_klass = NilClass, rtn, &condition) if (type == :void || rtn != nil) && (type_klass === rtn) && (!condition || condition.(rtn)) rtn else raise TypeError, "Expected #{meth} to return #{type} but got #{rtn.inspect} instead" end end |