Sha256: 9868d03edcf8fe3756f27034b23b5dd4436edae6ed22c8f0b571cb035a8942a6

Contents?: true

Size: 350 Bytes

Versions: 4

Compression:

Stored size: 350 Bytes

Contents

module Jimmy
  class TypeReference < Reference
    attr_reader :type

    def initialize(type, domain, *args)
      @type = type
      uri   = domain.root + "types/#{type}.json#"
      path  = uri.path.dup
      path << '?' << uri.query if uri.query
      path << '#' << uri.fragment if uri.fragment
      super path, domain, *args
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jimmy-0.5.5 lib/jimmy/type_reference.rb
jimmy-0.5.4 lib/jimmy/type_reference.rb
jimmy-0.5.3 lib/jimmy/type_reference.rb
jimmy-0.5.2 lib/jimmy/type_reference.rb