Skip to content

Commit d639a6d

Browse files
Switch Class to Module
1 parent 4a75ade commit d639a6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/critical-path-css.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
class CriticalPathCss
1+
module CriticalPathCss
22
require 'phantomjs'
33

44
CACHE_NAMESPACE = 'critical-path-css'
55
PENTHOUSE_PATH = "#{File.dirname(__FILE__)}/penthouse/penthouse.js"
66

7-
def self.generate (main_css_path, base_url, routes)
7+
def generate_critical_css (main_css_path, base_url, routes)
88
full_main_css_path = "#{Rails.root.to_s}/public#{main_css_path}"
99

1010
routes.each do |route|
@@ -13,7 +13,7 @@ def self.generate (main_css_path, base_url, routes)
1313
end
1414
end
1515

16-
def self.fetch (route)
16+
def fetch_critical_css (route)
1717
Rails.cache.read(route, namespace: CACHE_NAMESPACE) || ''
1818
end
1919
end

0 commit comments

Comments
 (0)