Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5b81e90

Browse files
committed
Apply rubocop 1.3.0 fixes
1 parent 55940b4 commit 5b81e90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ruby/lib/plus_codes/open_location_code.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ def encode(latitude, longitude, code_length = PAIR_CODE_LENGTH)
8282
code = CODE_ALPHABET[lat_val % 20] + code
8383
lat_val = lat_val.div 20
8484
lng_val = lng_val.div 20
85-
code = '+' + code if i.zero?
85+
code = "+#{code}" if i.zero?
8686
end
8787
# If we don't need to pad the code, return the requested section.
8888
return code[0, code_length + 1] if code_length >= SEPARATOR_POSITION
8989

9090
# Pad and return the code.
91-
code[0, code_length] + PADDING * (SEPARATOR_POSITION - code_length) + '+'
91+
"#{code[0, code_length]}#{PADDING * (SEPARATOR_POSITION - code_length)}+"
9292
end
9393

9494
# Decodes an Open Location Code(Plus+Codes) into a [CodeArea].

0 commit comments

Comments
 (0)