Class: OverpassAPI::QL
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
- #build_query(q) ⇒ 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.
5 6 7 8 9 |
# File 'lib/ql.rb', line 5 def initialize(args={}) super @maxsize = args[:maxsize] end |
Instance Method Details
#build_query(q) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/ql.rb', line 11 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 |