From f79c5c83943fbaf321a8ca04d37877ee6e08f87a Mon Sep 17 00:00:00 2001 From: Gibheer Date: Fri, 30 Nov 2012 16:22:36 +0100 Subject: mapping is not needed at this point --- lib/zero/request/accept.rb | 8 -------- lib/zero/request/accept_type.rb | 8 -------- 2 files changed, 16 deletions(-) (limited to 'lib') diff --git a/lib/zero/request/accept.rb b/lib/zero/request/accept.rb index 01bdd2b..e1e669a 100644 --- a/lib/zero/request/accept.rb +++ b/lib/zero/request/accept.rb @@ -13,14 +13,6 @@ module Zero KEY_HTTP_ACCEPT_LANGUAGE = 'HTTP_ACCEPT_LANGUAGE' KEY_HTTP_ACCEPT_ENCODING = 'HTTP_ACCEPT_ENCODING' - def self.map=(map) - @@map = map - end - - def self.map - @@map ||= {} - end - # create a new accept object def initialize(environment) @types = AcceptType.new(environment[KEY_HTTP_ACCEPT]) diff --git a/lib/zero/request/accept_type.rb b/lib/zero/request/accept_type.rb index a4ccc04..918bf24 100644 --- a/lib/zero/request/accept_type.rb +++ b/lib/zero/request/accept_type.rb @@ -53,14 +53,6 @@ module Zero end [media_type, 0] end - - # map media types to the type given in the map - # @param type [String] the media type - # @return the media type of the mapping or the original - def map_type(type) - return map[type] if map.has_key?(type) - type - end end end end -- cgit v1.2.3-70-g09d2