lib/ratebeer/location.rb
def url
      @url ||= case @location_type
               when :country
                 URI.join(BASE_URL, country_url(id))
               when :region
                 URI.join(BASE_URL, region_url(id))
               else
                 raise "invalid location type: #{@location_type}"
               end
    end
# Return URL for page containing information on this location.
#
# Result depends on whether this is a country or a region.
#
Return URL for page containing information on this location.
Result depends on whether this is a country or a region.
Return URL for page containing information on this location . Result depends on whether this is a country or a region .
def url
      @url ||= case @location_type
               when :country
                 URI.join(BASE_URL, country_url(id))
               when :region
                 URI.join(BASE_URL, region_url(id))
               else
                 raise "invalid location type: #{@location_type}"
               end
    end
def url @url ||= case @location_type when :country URI . join ( BASE_URL , country_url ( id ) ) when :region URI . join ( BASE_URL , region_url ( id ) ) else raise "invalid location type: #{@location_type}" end end
Return URL for page containing information on this location.
Return URL for page containing information on this location .