Skip to content

Commit

Permalink
Fix rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Feb 18, 2025
1 parent 881d0b1 commit 79f5ccc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/rich_text.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module RichText
SPAMMY_PHRASES = [
"Business Description:", "Additional Keywords:"
Expand Down Expand Up @@ -144,7 +146,7 @@ def first_truncated_text_content(element)
end

def truncated_text_content(element)
text = String.new
text = +""

append_text = lambda do |child|
if child.type == :text
Expand Down
4 changes: 3 additions & 1 deletion lib/short_link.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

##
# Encodes and decodes locations from Morton-coded "quad tile" strings. Each
# variable-length string encodes to a precision of one pixel per tile (roughly,
Expand Down Expand Up @@ -57,7 +59,7 @@ def decode(str)
def encode(lon, lat, z)
code = interleave_bits(((lon + 180.0) * (2**32) / 360.0).to_i,
((lat + 90.0) * (2**32) / 180.0).to_i)
str = String.new
str = +""
# add eight to the zoom level, which approximates an accuracy of
# one pixel in a tile.
((z + 8) / 3.0).ceil.times do |i|
Expand Down

0 comments on commit 79f5ccc

Please sign in to comment.