Skip to content

Commit

Permalink
Make init_encoders private
Browse files Browse the repository at this point in the history
It is internal only.
  • Loading branch information
larskanis committed Oct 4, 2019
1 parent e9bff89 commit 934f37c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/pg/basic_type_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,6 @@ def initialize(connection)
init_encoders
end

def init_encoders
coders.each { |kl, c| self[kl] = nil } # Clear type map
populate_encoder_list
@anyarray_encoder = coder_by_name(0, :encoder, '_any')
end

def encode_array_as=(pg_type)
case pg_type
when :array
Expand All @@ -425,6 +419,12 @@ def encode_array_as

private

def init_encoders
coders.each { |kl, c| self[kl] = nil } # Clear type map
populate_encoder_list
@anyarray_encoder = coder_by_name(0, :encoder, '_any')
end

def coder_by_name(format, direction, name)
check_format_and_direction(format, direction)
@coder_maps[format][direction].coder_by_name(name)
Expand Down

0 comments on commit 934f37c

Please sign in to comment.