Class: CriticalPathCss::CssFetcher
- Inherits:
-
Object
- Object
- CriticalPathCss::CssFetcher
- Defined in:
- lib/critical_path_css/css_fetcher.rb
Constant Summary collapse
- PENTHOUSE_PATH =
"#{File.dirname(__FILE__)}/../penthouse/penthouse.js"
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize ⇒ CssFetcher
constructor
A new instance of CssFetcher.
Constructor Details
#initialize ⇒ CssFetcher
Returns a new instance of CssFetcher.
8 9 10 |
# File 'lib/critical_path_css/css_fetcher.rb', line 8 def initialize @config = Configuration.new end |
Instance Method Details
#fetch ⇒ Object
12 13 14 |
# File 'lib/critical_path_css/css_fetcher.rb', line 12 def fetch @config.routes.map { |route| [route, css_for_route(route)] }.to_h end |