Class: Xhive::StylesheetPresenter

Inherits:
BasePresenter show all
Defined in:
app/presenters/xhive/stylesheet_presenter.rb

Instance Attribute Summary

Attributes inherited from BasePresenter

#object

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BasePresenter

#id, #initialize, #safe_user

Constructor Details

This class inherits a constructor from Xhive::BasePresenter

Class Method Details

.all_compressed(stylesheets) ⇒ Object



16
17
18
19
20
# File 'app/presenters/xhive/stylesheet_presenter.rb', line 16

def self.all_compressed(stylesheets)
  stylesheets.inject('') do |result, stylesheet|
    result << compress(stylesheet.content)
  end
end

Instance Method Details

#compressedObject



12
13
14
# File 'app/presenters/xhive/stylesheet_presenter.rb', line 12

def compressed
  self.class.compress(content)
end

#contentObject



8
9
10
# File 'app/presenters/xhive/stylesheet_presenter.rb', line 8

def content
  filter_images_urls(stylesheet.content)
end