Sha256: 0c5319f2ba4064f15b65008fad63b572af6a6a2a93a0c32cdad59866892f208b
Contents?: true
Size: 773 Bytes
Versions: 24
Compression:
Stored size: 773 Bytes
Contents
module Ratis class Landmark attr_accessor :type, :verbose, :location, :locality def self.where(conditions) type = conditions.delete(:type).to_s.upcase raise ArgumentError.new('You must provide a type') if type.blank? Ratis.all_conditions_used? conditions response = Request.get 'Getlandmarks', {'Type' => type} return [] unless response.success? response.to_array(:getlandmarks_response, :landmarks, :landmark).map do |landmark| atis_landmark = Landmark.new atis_landmark.type = landmark[:type] atis_landmark.verbose = landmark[:verbose] atis_landmark.location = landmark[:location] atis_landmark.locality = landmark[:locality] atis_landmark end end end end
Version data entries
24 entries across 24 versions & 1 rubygems
Version | Path |
---|---|
ratis-2.5.2.5 | lib/ratis/landmark.rb |
ratis-2.5.2.4 | lib/ratis/landmark.rb |
ratis-2.5.2.2 | lib/ratis/landmark.rb |
ratis-2.5.2.1 | lib/ratis/landmark.rb |