方法
- #
- D
- E
- N
- V
所含模組
屬性
[R] | symbols |
類別公開方法
new() 連結
來源:顯示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 13 def initialize @mimes = [] @symbols = [] @symbols_set = Set.new end
實例公開方法
<<(type) 連結
來源:顯示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 23 def <<(type) @mimes << type sym_type = type.to_sym @symbols << sym_type @symbols_set << sym_type end
delete_if() 連結
來源:顯示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 30 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
each(&block) 連結
來源:顯示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 19 def each(&block) @mimes.each(&block) end
valid_symbols?(symbols) 連結
來源:顯示 | 在 GitHub 上
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 41 def valid_symbols?(symbols) # :nodoc symbols.all? { |s| @symbols_set.include?(s) } end