Methods

Included Modules

Attributes

[R] symbols

Class Public methods

new()

📝 Source code
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 11
    def initialize
      @mimes = []
      @symbols = []
      @symbols_set = Set.new
    end
🔎 See on GitHub

Instance Public methods

<<(type)

📝 Source code
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 21
    def <<(type)
      @mimes << type
      sym_type = type.to_sym
      @symbols << sym_type
      @symbols_set << sym_type
    end
🔎 See on GitHub

delete_if()

📝 Source code
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 28
    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
🔎 See on GitHub

each(&block)

📝 Source code
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 17
    def each(&block)
      @mimes.each(&block)
    end
🔎 See on GitHub

valid_symbols?(symbols)

📝 Source code
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 39
    def valid_symbols?(symbols) # :nodoc
      symbols.all? { |s| @symbols_set.include?(s) }
    end
🔎 See on GitHub