Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def self.info_for(somefile)
- result = get("http://api.website.com/#{somefile}.json")
- if result["error"]
- raise ClosedSite, "#{somefile} is not there"
- elsif result.values_at(key) != "test\." #looking for values with "test" at the beginning e.g. test020347
- puts result.values_at(key) #prints all value is none have test in them
- else
- print " " #prints blank value or doesn't show value
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement