Class: DataMapperRest::Format

### Home Classes Methods

### In Files

- lib/dm-rest-adapter/formats.rb

### Parent

Object

### Methods

- ::new
- #header

### Files

- LICENSE
- README.rdoc

### Class/Module Index

Quicksearch

- DataMapperRest
- DataMapperRest::Adapter
- DataMapperRest::BadRequest
- DataMapperRest::ClientError
- DataMapperRest::Connection
- DataMapperRest::ForbiddenAccess
- DataMapperRest::Format
- DataMapperRest::ResourceConflict
- DataMapperRest::ResourceInvalid
- DataMapperRest::ResourceNotFound
- DataMapperRest::ServerError
- DataMapperRest::TimeoutError
- DataMapperRest::UnauthorizedAccess
- DataMapper
- DataMapper::Spec
- DataMapper::Spec::Adapters
- DataMapper::Spec::Adapters::RestAdapter
- Object

No matching classes.

# DataMapperRest::Format

Absolutely simple format class, extend later if needed

### Attributes

extension[RW]
mime[RW]

### Public Class Methods

new(type) click to toggle source

    # File lib/dm-rest-adapter/formats.rb, line 6
    def initialize(type)
      @extension = type
      @mime      = "application/#{type}"
    end

### Public Instance Methods

header() click to toggle source

    # File lib/dm-rest-adapter/formats.rb, line 11
    def header
      { 'Content-Type' => @mime }
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.