Sha256: 8eb89918cf26f80d88c17fee21f5ae462f4ad4371a2869715b213310706ad912
Contents?: true
Size: 326 Bytes
Versions: 25
Compression:
Stored size: 326 Bytes
Contents
module NationBuilder class URL def initialize(url_template) @url_template = url_template end def generate_url(extension, parameters) url = URI.join(@url_template, '/api/v1' + extension).to_s parameters.each { |name, value| url.gsub!(name.inspect, value.to_s) } url end end end
Version data entries
25 entries across 25 versions & 1 rubygems