Method: YANAPI::Query#get
- Defined in:
- lib/yanapi/query.rb
#get ⇒ Object
This is the main method. It gets the body of the HTTP response and invokes the respective check. It returns the response or <nil> if the response is emtpy.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/yanapi/query.rb', line 31 def get http_response = get_response(@url) case @output when 'xml' prove_xml(http_response) when 'json' fail NotImplementedError, 'We do not handle JSON yet!' when 'php' fail NotImplementedError, 'We do not handle PHP yet!' when 'rss' fail NotImplementedError, 'We do not handle RSS yet!' end end |