I am trying to learn Ruby, but I am having problems using the API.
For example, I am looking at this:
decode(json)
Converts a JSON string into a Ruby object.
# File lib/active_support/json/decoding.rb, line 11
11: def decode(json)
12: YAML.load(convert_json_to_yaml(json))
13: rescue ArgumentError => e
14: raise ParseError, "Invalid JSON string"
15: end
How can I find out about how to use the returned “Ruby Object”? Like the methods available and etc? Thanks a ton.
Yes it has:
http://ruby-doc.org/
Look for example:
http://ruby-doc.org/core-1.9.3/
There you could search api by name of method or name of the class.