Sha256: 53d92f60d8466ac0fd149c3a87801224f763a677a12df9afe1846e8bfd460800

Contents?: true

Size: 585 Bytes

Versions: 23

Compression:

Stored size: 585 Bytes

Contents

# frozen_string_literal: true

module Praxis
  # Stripped-down representation of an Internet Media Type where the structure and content of the
  # type are unknown, or are defined externally to the Praxis application.
  #
  # @see Praxis::MediaType
  # @see Praxis::Types::MediaTypeCommon
  SimpleMediaType = Struct.new(:identifier) do
    def name
      self.class.name
    end

    def self.id
      'Praxis-SimpleMediaType'
    end

    def id
      self.class.id
    end

    def describe(*)
      { name: name, family: 'string', id: id, identifier: identifier }
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
praxis-2.0.0 lib/praxis/simple_media_type.rb
praxis-2.0.pre.40 lib/praxis/simple_media_type.rb
praxis-2.0.pre.39 lib/praxis/simple_media_type.rb
praxis-2.0.pre.38 lib/praxis/simple_media_type.rb
praxis-2.0.pre.37 lib/praxis/simple_media_type.rb
praxis-2.0.pre.36 lib/praxis/simple_media_type.rb
praxis-2.0.pre.35 lib/praxis/simple_media_type.rb
praxis-2.0.pre.34 lib/praxis/simple_media_type.rb
praxis-2.0.pre.33 lib/praxis/simple_media_type.rb
praxis-2.0.pre.32 lib/praxis/simple_media_type.rb
praxis-2.0.pre.31 lib/praxis/simple_media_type.rb
praxis-2.0.pre.30 lib/praxis/simple_media_type.rb
praxis-2.0.pre.29 lib/praxis/simple_media_type.rb
praxis-2.0.pre.28 lib/praxis/simple_media_type.rb
praxis-2.0.pre.27 lib/praxis/simple_media_type.rb
praxis-2.0.pre.26 lib/praxis/simple_media_type.rb
praxis-2.0.pre.25 lib/praxis/simple_media_type.rb
praxis-2.0.pre.24 lib/praxis/simple_media_type.rb
praxis-2.0.pre.23 lib/praxis/simple_media_type.rb
praxis-2.0.pre.22 lib/praxis/simple_media_type.rb