class Mime::Mimes
def <<(type)
def <<(type) @mimes << type sym_type = type.to_sym @symbols << sym_type @symbols_set << sym_type end
def delete_if
def delete_if @mimes.delete_if do |x| if yield x sym_type = x.to_sym @symbols.delete(sym_type) @symbols_set.delete(sym_type) true end end end
def each(&block)
def each(&block) @mimes.each(&block) end
def initialize
def initialize @mimes = [] @symbols = [] @symbols_set = Set.new end
def valid_symbols?(symbols) # :nodoc
def valid_symbols?(symbols) # :nodoc symbols.all? { |s| @symbols_set.include?(s) } end