Sha256: cffbbe84004115abe7932f009c0a7b490d5486ace9ae4c709bfe821d186a1036

Contents?: true

Size: 575 Bytes

Versions: 22

Compression:

Stored size: 575 Bytes

Contents

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".freeze
    end

    def id
      self.class.id
    end


    def describe(shallow=true)
      {name: name, family: "string", id: id, identifier: identifier}
    end

  end

end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
praxis-2.0.pre.18 lib/praxis/simple_media_type.rb
praxis-2.0.pre.17 lib/praxis/simple_media_type.rb
praxis-2.0.pre.16 lib/praxis/simple_media_type.rb
praxis-2.0.pre.15 lib/praxis/simple_media_type.rb
praxis-2.0.pre.14 lib/praxis/simple_media_type.rb
praxis-2.0.pre.13 lib/praxis/simple_media_type.rb
praxis-2.0.pre.12 lib/praxis/simple_media_type.rb
praxis-2.0.pre.11 lib/praxis/simple_media_type.rb
praxis-2.0.pre.10 lib/praxis/simple_media_type.rb
praxis-2.0.pre.9 lib/praxis/simple_media_type.rb
praxis-2.0.pre.8 lib/praxis/simple_media_type.rb
praxis-2.0.pre.7 lib/praxis/simple_media_type.rb
praxis-2.0.pre.6 lib/praxis/simple_media_type.rb
praxis-2.0.pre.5 lib/praxis/simple_media_type.rb
praxis-2.0.pre.4 lib/praxis/simple_media_type.rb
praxis-2.0.pre.3 lib/praxis/simple_media_type.rb
praxis-2.0.pre.2 lib/praxis/simple_media_type.rb
praxis-2.0.pre.1 lib/praxis/simple_media_type.rb
praxis-0.22.pre.2 lib/praxis/simple_media_type.rb
praxis-0.22.pre.1 lib/praxis/simple_media_type.rb