Sha256: 397e6757b4d4f2c8fabecddbde1269fe49d087a2b4c29e9f7be84d5b3c0cbe42

Contents?: true

Size: 421 Bytes

Versions: 1

Compression:

Stored size: 421 Bytes

Contents

class CityGrid
  class Search < Abstraction::Collection
    def api
      CityGrid::API::Content::Places::Search
    end

    def request opts = {}
      api.request_with_publisher opts
    end

    private

    def preprocess response
      return nil unless response && response.results && response.results.locations

      response.results.locations.map do |attrs|
        Listing.new attrs
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
citygrid_api-0.0.5.1 lib/citygrid/search.rb