Advertisement
nanenj

Contrived example for documentation

Jul 4th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.45 KB | None | 0 0
  1. # Parses response from third party API
  2. # @params response [JSON] the raw json response from third party API
  3. # * :status [String] string representation of the response status
  4. # * :data [Hash]
  5. # * * :user_id [Integer] ID of the user object returned
  6. # * * :name [String] Name of the user returned
  7. # @return [Hash] Hash of the data returned
  8. # * :user_id [Integer]
  9. # * :name [String]
  10. def user_hash_helper(response)
  11.   JSON.parse(response)["data"]
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement