Skip to content

Commit

Permalink
Expose HTTP::FormData.encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienChaynes committed May 30, 2018
1 parent 74ecde7 commit d7a2c3f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/http/form_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ def create(data)
end

def encoder
::URI.method(:encode_www_form)
@encoder ||= ::URI.method(:encode_www_form)
end

def encoder=(encoder)
@encoder = encoder
end

# Coerce `obj` to Hash.
Expand Down

0 comments on commit d7a2c3f

Please sign in to comment.