Sha256: 1f2382462b3eeec46c89ca2c37e6f012d456ee9df39eefa8fff5457ff14376e7
Contents?: true
Size: 572 Bytes
Versions: 45
Compression:
Stored size: 572 Bytes
Contents
module ActiveResource module Formats autoload :XmlFormat, 'active_resource/formats/xml_format' autoload :JsonFormat, 'active_resource/formats/json_format' # Lookup the format class from a mime type reference symbol. Example: # # ActiveResource::Formats[:xml] # => ActiveResource::Formats::XmlFormat # ActiveResource::Formats[:json] # => ActiveResource::Formats::JsonFormat def self.[](mime_type_reference) ActiveResource::Formats.const_get(ActiveSupport::Inflector.camelize(mime_type_reference.to_s) + "Format") end end end
Version data entries
45 entries across 45 versions & 1 rubygems