Class: Hamfinder::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/hamfinder.rb

Class Method Summary collapse

Class Method Details

.query(options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/hamfinder.rb', line 5

def self.query(options = {})
  band = band_selection(options[:band])
  options[:radius] ? radius = set_radius(options[:radius]) : radius = "&distance=10&Dunit=m"
  zip = set_zip(options[:zip])
  url = "https://www.repeaterbook.com/repeaters/prox_result.php?#{zip}#{radius}#{band}&status_id=1"
  parse(url)
end