Sha256: 9e40e3b16b73ae589128c39ce855a37c096668f0ce92df95a774262f41464297

Contents?: true

Size: 404 Bytes

Versions: 3

Compression:

Stored size: 404 Bytes

Contents

require_relative "base"

module OverpassAPI
  class QL < Base
    def initialize(args={})
      super

      @maxsize = args[:maxsize]
    end

    def build_query(q)
      header = ""
      header << "[bbox:#{@bbox}]" if @bbox
      header << "[timeout:#{@timeout}]" if @timeout
      header << "[maxsize:#{@maxsize}]" if @maxsize

      header << "[out:json]"

      "#{header};#{q}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
overpass-api-ruby-0.3 lib/ql.rb
overpass-api-ruby-0.2.3 lib/ql.rb
overpass-api-ruby-0.2.2 lib/ql.rb