require 'uri'

module Spectrum
  module Config
    class Z3988Literal
      attr_accessor :id, :namespace

      def initialize(args)
        self.id = args['id'] if args
        self.namespace = args['namespace'] || '' if args
      end

      def value(data)
        if id && data && data[:value]
          [data[:value]].flatten.map do |val|
            "#{URI::encode_www_form_component(id)}=#{URI::encode_www_form_component(namespace + val)}"
          end
        else
          [ ]
        end
      end
    end
  end
end

require 'uri'

module Spectrum
  module Config
    class Z3988Literal
      attr_accessor :id, :namespace

      def initialize(args)
        self.id = args['id'] if args
        self.namespace = args['namespace'] || '' if args
      end

      def value(data)
        if id && data && data[:value]
          [data[:value]].flatten.map do |val|
            "#{URI::encode_www_form_component(id)}=#{URI::encode_www_form_component(namespace + val.to_s)}"
          end
        else
          [ ]
        end
      end
    end
  end
end

Fix "no implicit conversion" error
Fix "no implicit conversion" error

I was getting a "no implicit conversion of Integer into String" error on
this line; adding this to_s fixed it
