module BehindTheName::Refinements

Public Instance Methods

compact() click to toggle source
# File lib/behind_the_name/refinements.rb, line 19
def compact
  reject { |_, v| v.nil? }
end
parse_as_json() click to toggle source
# File lib/behind_the_name/refinements.rb, line 7
def parse_as_json
  body.parse_as_json
end
to_uri_query() click to toggle source
# File lib/behind_the_name/refinements.rb, line 23
def to_uri_query
  self
    .compact
    .map { |k, v| "#{URI.escape(k.to_s)}=#{v}" }
    .join('&')
end