Module: ActiveResource::Formats

### Home Classes Methods

### In Files

- lib/active_resource/formats/xml_format.rb
- lib/active_resource/formats/json_format.rb
- lib/active_resource/formats.rb

### Namespace

- MODULE ActiveResource::Formats::JsonFormat
- MODULE ActiveResource::Formats::XmlFormat

### Methods

- ::[]

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- ActiveResource
- ActiveResource::BadRequest
- ActiveResource::Base
- ActiveResource::ClientError
- ActiveResource::Connection
- ActiveResource::CustomMethods
- ActiveResource::CustomMethods::ClassMethods
- ActiveResource::CustomMethods::InstanceMethods
- ActiveResource::Errors
- ActiveResource::ForbiddenAccess
- ActiveResource::Formats
- ActiveResource::Formats::JsonFormat
- ActiveResource::Formats::XmlFormat
- ActiveResource::HttpMock
- ActiveResource::InvalidRequestError
- ActiveResource::LogSubscriber
- ActiveResource::Observing
- ActiveResource::Railtie
- ActiveResource::Request
- ActiveResource::ResourceConflict
- ActiveResource::ResourceGone
- ActiveResource::ResourceNotFound
- ActiveResource::Response
- ActiveResource::SSLError
- ActiveResource::ServerError
- ActiveResource::TimeoutError
- ActiveResource::UnauthorizedAccess
- ActiveResource::Validations

No matching classes.

# ActiveResource::Formats

### Public Class Methods

[](mime_type_reference) click to toggle source

Lookup the format class from a mime type reference symbol. Example:

    ActiveResource::Formats[:xml]  # => ActiveResource::Formats::XmlFormat
    ActiveResource::Formats[:json] # => ActiveResource::Formats::JsonFormat

    # File lib/active_resource/formats.rb, line 10
    def self.[](mime_type_reference)
      ActiveResource::Formats.const_get(ActiveSupport::Inflector.camelize(mime_type_reference.to_s) + "Format")
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.