Method: AMEE::Data::Item.parse
- Defined in:
- lib/amee/data_item.rb
.parse(connection, response) ⇒ Object
186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/amee/data_item.rb', line 186 def self.parse(connection, response) # Parse data from response if response.is_json? item = Item.from_json(response) else item = Item.from_xml(response) end # Store connection in object for future use item.connection = connection # Done return item end |