Sha256: 16b26bf7bb0640e4ad79fc5484182c32431c8526edc52ad0a015a91e66ccc9bf

Contents?: true

Size: 300 Bytes

Versions: 14

Compression:

Stored size: 300 Bytes

Contents

module DataMapperRest
  # Absolutely simple format class, extend later if needed
  class Format
    attr_accessor :extension, :mime

    def initialize(type)
      @extension = type
      @mime      = "application/#{type}"
    end

    def header
      { 'Content-Type' => @mime }
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
dm-rest-adapter-1.2.0 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-1.2.0.rc2 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-1.2.0.rc1 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-1.1.0 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-1.1.0.rc3 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-1.1.0.rc2 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-1.1.0.rc1 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-1.0.2 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-1.0.1 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-1.0.0 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-1.0.0.rc3 lib/dm-rest-adapter/formats.rb
dm-rest-adapter-0.10.2 lib/rest_adapter/formats.rb
dm-rest-adapter-0.10.1 lib/rest_adapter/formats.rb
dm-rest-adapter-0.10.0 lib/rest_adapter/formats.rb