Class: Barometer::Query::Converter::FromShortZipcodeToZipcode
- Inherits:
-
Object
- Object
- Barometer::Query::Converter::FromShortZipcodeToZipcode
- Defined in:
- lib/barometer/query/converters/from_short_zipcode_to_zipcode.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(query) ⇒ FromShortZipcodeToZipcode
constructor
A new instance of FromShortZipcodeToZipcode.
Constructor Details
#initialize(query) ⇒ FromShortZipcodeToZipcode
Returns a new instance of FromShortZipcodeToZipcode.
9 10 11 |
# File 'lib/barometer/query/converters/from_short_zipcode_to_zipcode.rb', line 9 def initialize(query) @query = query end |
Class Method Details
.from ⇒ Object
5 6 7 |
# File 'lib/barometer/query/converters/from_short_zipcode_to_zipcode.rb', line 5 def self.from [:short_zipcode] end |
Instance Method Details
#call ⇒ Object
13 14 15 16 |
# File 'lib/barometer/query/converters/from_short_zipcode_to_zipcode.rb', line 13 def call return unless can_convert? @query.add_conversion(:zipcode, @query.get_conversion(:short_zipcode).q) end |