Class: Merb::AcceptType

Class | Merb::AcceptType
In: | lib/merb-core/controller/mixins/responder.rb
Parent: | Object

### Methods

<=> == eql? hash mime new super_range synonyms to_s to_sym

### Attributes

index | [R] |
media_range | [R] |
quality | [R] |
sub_type | [R] |
type | [R] |

### Public Class methods

new(entry,index)

#### Parameters

entry<String>: | The accept type pattern
index<Fixnum>: | The index used for sorting accept types. A lower value indicates higher priority.

:api: private

### Public Instance methods

<=>(entry)

Compares two accept types for sorting purposes.

#### Parameters

entry<AcceptType>: | The accept type to compare.

#### Returns

Fixnum: | -1, 0 or 1, depending on whether entry has a lower, equal or higher priority than the accept type being compared.

:api: private

==(entry)

An alias for eql?.

:api: private

eql?(entry)

#### Parameters

entry<AcceptType>: | The accept type to compare.

#### Returns

Boolean: | True if the accept types are equal, i.e. if the synonyms for this accept type includes the entry media range.

:api: private

hash()

#### Returns

Fixnum: | A hash based on the super range.

:api: private

mime()

:api: private

super_range()

#### Returns

String: | The primary media range for this accept type, i.e. either the first synonym or, if none exist, the media range.

:api: private

synonyms()

#### Returns

Array[String]: | All Accept header values, such as "text/html", that match this type.

:api: private

to_s()

#### Returns

String: | The accept type as a string, i.e. the media range.

:api: private

to_sym()

#### Returns

Symbol: The type as a symbol, e.g. :html.

:api: private

[Validate]