Sunday, March 4, 2018

Ruby Class Manipulation & Reflection

Ruby Class Functions Verify the class of a Ruby object obj.instance_of? String # Check if "obj" is a String obj.class == String # Same as above obj.is_a? Numeric # Check if "obj" is a Numeric or its sub-type obj.

No comments:

How can you work with a JSON value if you know nothing about it?

I have talked about the difficulty of typing certain JSON values coming from some APIs. The JSON is just very complicated. When I do that,...