Contrived example for documentation
# Parses response from third party API # @params response [JSON] the raw json response from third party API # * :status [String] string representation of the response status # * :data [Hash] # * * :user_id [Integer] ID of the user object returned # * * :name [String] Name of the user returned # @return [Hash] Hash of the data returned # * :user_id [Integer] # * :name [String] def user_hash_helper(response) Β JSON.parse(response)["data"] end
Comments