Class: OverpassAPI::QL
Overview
builds queries in overpass ql format
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
- #build_query(query) ⇒ Object
-
#initialize(args = {}) ⇒ QL
constructor
A new instance of QL.
Methods inherited from Base
#bounding_box, #query, #raw_query
Constructor Details
#initialize(args = {}) ⇒ QL
Returns a new instance of QL.
6 7 8 9 |
# File 'lib/ql.rb', line 6 def initialize(args = {}) super @maxsize = args[:maxsize] end |
Instance Method Details
#build_query(query) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ql.rb', line 11 def build_query(query) header = '' header << "[bbox:#{@bbox}]" if @bbox header << "[timeout:#{@timeout}]" if @timeout header << "[maxsize:#{@maxsize}]" if @maxsize header << '[out:json]' "#{header};#{query}" end |