Class: Mime::Mimes
Instance Method Summary
collapse
Methods included from Enumerable
#as_json, #exclude?, #index_by, #many?, #pluck, #sum, #without
Constructor Details
#initialize ⇒ Mimes
Returns a new instance of Mimes.
12
13
14
15
|
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 12
def initialize
@mimes = []
@symbols = nil
end
|
Instance Method Details
21
22
23
24
|
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 21
def <<(type)
@mimes << type
@symbols = nil
end
|
#delete_if ⇒ Object
26
27
28
|
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 26
def delete_if
@mimes.delete_if { |x| yield x }.tap { @symbols = nil }
end
|
17
18
19
|
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 17
def each
@mimes.each { |x| yield x }
end
|
30
31
32
|
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 30
def symbols
@symbols ||= map(&:to_sym)
end
|