Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ruby/lib/plus_codes.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# frozen_string_literal: true

# Plus+Codes is a Ruby implementation of Google Open Location Code (Plus Codes).
#
# @author We-Ming Wu
module PlusCodes
# The character set used to encode coordinates.
CODE_ALPHABET = '23456789CFGHJMPQRVWX'.freeze
CODE_ALPHABET = '23456789CFGHJMPQRVWX'

# The character used to pad a code
PADDING = '0'.freeze
PADDING = '0'

# A separator used to separate the code into two parts.
SEPARATOR = '+'.freeze
SEPARATOR = '+'

# The max number of characters can be placed before the separator.
SEPARATOR_POSITION = 8
Expand Down
2 changes: 2 additions & 0 deletions ruby/lib/plus_codes/code_area.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module PlusCodes
# [CodeArea] contains coordinates of a decoded Open Location Code(Plus+Codes).
# The coordinates include the latitude and longitude of the lower left and
Expand Down
2 changes: 2 additions & 0 deletions ruby/lib/plus_codes/open_location_code.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative '../plus_codes'
require_relative '../plus_codes/code_area'

Expand Down
2 changes: 2 additions & 0 deletions ruby/open-location-code.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'date'
Expand Down
2 changes: 2 additions & 0 deletions ruby/test/plus_codes_test.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'test/unit'
require_relative '../lib/plus_codes/open_location_code'

Expand Down