Parent

Methods

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.