Skip to content

Commit

Permalink
Merge pull request #4 from TehSnappy/master
Browse files Browse the repository at this point in the history
Support for more data types
  • Loading branch information
pareeohnos authored Dec 15, 2017
2 parents e220bd4 + 1c08cf4 commit 6a79370
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/geonames/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ defmodule Geonames.Helpers do
|> Enum.map(fn
{_,nil} -> nil
{k,v} when is_binary(v) -> "#{k}=#{v}"
{k,v} when is_float(v) -> "#{k}=#{v}"
{k,v} when is_boolean(v) -> "#{k}=#{v}"
{k,v} when is_integer(v) -> "#{k}=#{v}"
{k,arr} when is_list(arr) -> Enum.map(arr, &"#{k}=#{&1}")
end)
|> List.flatten
Expand Down

0 comments on commit 6a79370

Please # to comment.