class Klimt::Commands::City
Public Instance Methods
list()
click to toggle source
# File lib/klimt/commands/city.rb, line 9 def list file = options[:featured] ? 'featured-cities.json' : 'cities.json' uri = "http://artsy-geodata.s3-website-us-east-1.amazonaws.com/partner-cities/#{file}" response = Typhoeus.get(uri) jq_filter = options[:short] ? '.[] | { full_name, coords }' : '.' jq_options = options[:short] ? '-c' : '' render response.body, jq_filter: jq_filter, jq_options: jq_options end