Sha256: 710cf1bf196b1b62f7d6df2b79a2832817cf5bf5e7e3f6dea3464e417772d0cc
Contents?: true
Size: 609 Bytes
Versions: 8
Compression:
Stored size: 609 Bytes
Contents
module Barometer module Query module Converter class FromShortZipcodeToZipcode def self.from [:short_zipcode] end def initialize(query) @query = query end def call return unless can_convert? @query.add_conversion(:zipcode, @query.get_conversion(:short_zipcode).q) end private def can_convert? !!@query.get_conversion(*self.class.from) end end end end end Barometer::Query::Converter.register(:zipcode, Barometer::Query::Converter::FromShortZipcodeToZipcode)
Version data entries
8 entries across 8 versions & 1 rubygems