Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# El atributo manifest se evalua la primera vez que se pide y se cachea su resultado
class A
def manifest
if !@manifest.is_a?(Sprockets::Manifest) && @manifest.respond_to?(:call)
@manifest = @manifest.call
else
@manifest
end
end
attr_writer :manifest
def initialize
@manifest = lambda { Sprockets::Manifest.new(cached, output) }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.