Froze rails gems
[depot.git] / vendor / rails / activeresource / lib / active_resource / formats.rb
1 module ActiveResource
2 module Formats
3 # Lookup the format class from a mime type reference symbol. Example:
4 #
5 # ActiveResource::Formats[:xml] # => ActiveResource::Formats::XmlFormat
6 # ActiveResource::Formats[:json] # => ActiveResource::Formats::JsonFormat
7 def self.[](mime_type_reference)
8 ActiveResource::Formats.const_get(mime_type_reference.to_s.camelize + "Format")
9 end
10 end
11 end
12
13 require 'active_resource/formats/xml_format'
14 require 'active_resource/formats/json_format'