Class: Assets::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/assets/package.rb

Defined Under Namespace

Classes: Builder

Instance Method Summary collapse

Instance Method Details

#imagesEnumerable<Rule>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return image rules

Returns:

  • (Enumerable<Rule>)


21
22
23
24
25
# File 'lib/assets/package.rb', line 21

def images
  Mime::IMAGES.each_with_object([]) do |mime, images|
    images.concat(mime(mime))
  end
end

#mime(mime) ⇒ Enumerable<Rule>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return rules for mime type

Returns:

  • (Enumerable<Rule>)


11
12
13
# File 'lib/assets/package.rb', line 11

def mime(mime)
  contents.fetch(mime, [])
end